Hi *,

Please help me with issue 4279.
I think this issue is causing us a lot of problems we have seen lately.

The testcase in the issue shows that selecting "New" does not remove the listeners to notation-events.

The ActionNew class stops the modelevents:
Model.getPump().stopPumpingEvents();
then it calls Project.remove(), which removes all modelelements.
But since now there are no delete events, the Figs are not deleted.
And normally, the xxxFig.removeFromDiagram() removes the notationEvent listeners
with:
ArgoEventPump.removeListener(this);

So, we have an architecture problem at hand...


How do we solve this?


Possible solutions:

1. I have been thinking about removing everything in order, so that we use the listeners. This would mean, e.g. to remove first all diagrams but the last. Then remove all Figs. Then remove all ModelElements but the Model.
Then shutdown the eventpumps, and remove the model and the last diagram.

2. Alternatively, and much easier, is to create a function:
removeAllListeners()
on all event pumps (ArgoEventPump, Model.getPump(), any other?), and call these in Project.remove().

Any other thoughts?

Regards,
Michiel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to