Re-2: Catching message send

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re-2: Catching message send

Frank Urbach
I think you should looking at MessageSend an its classRefs. Perhaps you should look at Lukas package Announcements http://mc.lukas-renggli.ch/announcements/.
There you can see something related what you want.
Hope this helps.

Cheers,
  Frank
-------- Original Message --------
Subject: Re: [Newbies] Catching message send (31-Okt-2006 11:47)
From:    Mathieu <[hidden email]>
To:      [hidden email]

> Frank Urbach a écrit :
> > Hi Mathieu,
> >
> > what do you want do?
> >
> > Cheers,
> >   Frank
> >
>
> I want to catch evry message to an IRBuilder but manage to do it in my own
> way.
> It just to know if there is a Simple way.
>
> CatchIRSend>>doesNotUnderstand: aMessage
>
> | message |
> message := aMessage selector asString.
> aMessage arguments do:[:each | message := message, ' ', each printString].
> messageSend add: message.
> irBuilder perform: aMessage selector withArguments: aMessage arguments
>
>
> Math
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Catching message send

Lukas Renggli
> I think you should looking at MessageSend an its classRefs. Perhaps you should look at Lukas package Announcements http://mc.lukas-renggli.ch/announcements/.
> There you can see something related what you want.

To clarify the background of this package:

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>.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Catching message send

Mathieu SUEN
Lukas Renggli a écrit :

>> I think you should looking at MessageSend an its classRefs. Perhaps
>> you should look at Lukas package Announcements
>> http://mc.lukas-renggli.ch/announcements/.
>> There you can see something related what you want.
>
> To clarify the background of this package:
>
> 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>.
>
>
> Lukas
>

Ok thanks but What is the aim of Annoucements?

        Math
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re-2: Catching message send

Lukas Renggli
> > 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

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Catching message send

Mathieu SUEN
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
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Catching message send

Mathieu SUEN
In reply to this post by Lukas Renggli
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
>

oops ok I haven't seen the link you given me sorry :-/


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners