[squeak-dev] Re: SystemChangeNotifier and Announcements

Igor Stasenko siguctua at gmail.com
Sat Feb 27 17:57:54 UTC 2010


i'm only asking to use events, which can be cancelled by subscriptors.

And it would to use following scheme:
- notify _before_ change going to be made
- apply change
- notify _after_ change is made.

So, i expecting to have events to work using following scheme:

event := MethodChangeAnnouncement new action: [ here the action  ].
self announceBeforeChange: event.
self apply: event.
self announceAfterChange: event.

in this way, a subscriptor could tell 'event cancel',
And then in #apply: it will be a no-op.

SomeChangeAnnouncement>>action: aBlock
  action :=  [ aBlock value. applied := true ].

  action := nil.
  applied := false.
  cancelled := true.


Best regards,
Igor Stasenko AKA sig.

More information about the Squeak-dev mailing list