[Uml-devel] kdesdk/umbrello/umbrello

Luis De la Parra Blum lparrab at gmx.net
Tue Oct 7 13:43:04 UTC 2003


On Saturday 04 October 2003 11:22, Sebastian Stein wrote:
> CVS commit by sstein:
>          if (button != QDialog::Accepted) {
> +                if (newOperation)
> +                        classifier->removeOperation(newOperation);
>                  return NULL;
>          }
that will work, but would not it be better to first create the Operation 
"stand alone" and only after "Accepting" it add it to the classifier ?

Right now it's not well defined nor consistent who is responsabile for 
creating such things, sometimes the UMLDoc creates objects, some times the 
"Parent" objects... the same goes for deleting.
What do you think of trying to standarize this and rename methods to be
createXXX
deleteXXX for *creating and destroying*
and 
addXXX
removeXXX for inserting and removing things without deleting them ?

the way it is now you get a "new_operation1" in the widget and tree list, and
only after you take the changes with "Accept" does the operation get updated 
to the new name.
Views should react to *added and *removed signals, and not to *created or 
*destroyed

the question is...
who do you think should be responsible for creating objects? only the UMLDoc ?
or each "Container" object (classes create Operations and Attributes, etc )
luis






More information about the umbrello-devel mailing list