|
Re: Re: Re-2: Catching message send: msg#00171lang.smalltalk.squeak.beginners
> The original code comes from OmniBrowser. I generalized and extended Have a look at Vassili's blog entry, he explains it much more in detail than I can do here. Announcements are a clean and object-oriented replacement for the #change:, #update: and #triggerEvent: hacks in Squeak and other Smalltalk's. Announcements can be used pretty much the same way as exceptions, except that they are not limited to the execution stack. Interested parties can declare their interest for certain events to an announcer: announcer on: SomethingChanged do: [ :ann | ... ] Whenever the owner of the announcer triggers an event, all the registered blocks are evaluated: announcer announce: (SomethingChanged new foo: 12; yourself) Since announcements are objects they can be passed around, they can carry data, and they can even modified during the announcement processing (veto-able announcements). That's basically it. Lukas -- Lukas Renggli http://www.lukas-renggli.ch
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re[2]: Version Control and new VMs, Herbert König |
|---|---|
| Next by Date: | Re: Catching message send, Fabio Oliveira |
| Previous by Thread: | Re: Re-2: Catching message send, Mathieu |
| Next by Thread: | Re: Re-2: Catching message send, Mathieu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |