Hello Bob,
By "element" do you mean diagram element (ie Fig) and you're talking about the fig "owner"? In which case Is this really correct?
By "element" I mean a model element (not a fig).
I tested it like this: 0) Start ArgoUML in debug mode with breakpoints in the CoreFactory.createClass() and in CoreHelper.addOwnedElement(Object, Object) 1) Select in the Class Diagram the "New Class" tool. 2) Press the mouse button without releasing it 3) The debugger stops ArgoUML because it reached the breakpoint in CoreFactory where the class is created. This action is invoked from ModePlace.mousePressed(MouseEvent) 4) Resume the execution 5) The debugger reaches the second breakpoint in CoreHelper where the owner of the element is set. This is invoked from ModePlace.mouseReleased(MouseEvent)
It is safer to delay amending the model until the complete user interaction is finished.
I am curious why the model element is created on mouse pressed event and his owner is set on mouse release. I agree that the model element should not be created when the mouse is pressed and delay it's creation until the interaction finishes, but from my test this is not happening. Bogdan,
Regards Bob. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
