logo       

Re: Re-2: Catching message send: msg#00173

lang.smalltalk.squeak.beginners

Subject: Re: Re-2: Catching message send

Lukas Renggli a écrit :
>> > The original code comes from OmniBrowser. I generalized and extended
>> > it a little bit, since I use it in several projects. The original idea
>> > of announcements comes from Vassili Bykov as described in
>> > <http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?
>> > showComments=true&entry=3310034894>.
>>
>> Ok thanks but What is the aim of Annoucements?
>
> 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
>

Ok thanks lukas it seem to be nice but it's not really what I was looking for.
Anyway I have found a
way to do what I want.

Math


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise