SystemChangeNotification comments

Alexandre Bergel bergel at
Fri May 13 21:33:07 UTC 2005


Roel did some tests for his system change notification (SCN). However, the tests need to be adapted because the SCN has improved since. For instance, Nathanael did some refactorings. Because the SCN is a critical part of Squeak, currently I am adapting the tests that Roel did for the current version of SCN.

I also discovered some weakness in the current system. Before submitting anything, I would like to share some thoughts:

  - Events have to be emitted __AFTER__ the action occurs. Roel always that that rules in mind, which makes sense. However, this order is inverted when a class is removed. Look at SystemDictionary>>forgetClass:logged:, the event emission occurs before the removal.

  - Regarding a remove event, what are the informations that an event should carry? If I remove a class, do the event have a reference to this class then? If yes, then the class is removed from the system, an event is triggered and this one have a ref to the just-removed class. IMHO, this schemas makes sense because an event should carry the right amount of informations such that a client does not prefer to receive this event before the action occurs.

  - The original version of SCN triggers a DoIt event _each_ time the user perform one. In that case, the event has the information if it should be logged or not. In the new version of the SCN, a doit event is emitted only if it should be logged.

  - The original version of SCN, when a set of instance variables are added, several events are emitted, one per variable. In the new version, just one modified event is emitted. I do not know which of these two way is better. Need help for this point...


Alexandre Bergel

More information about the Squeak-dev mailing list