Is there a way to broadcast messages to more than one recipient?

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

Is there a way to broadcast messages to more than one recipient?

projectVALIS
As far as I can tell, messages have to be directed at a single recipient. Is this the case or, for example, is it possible to blast a message to every member of an Array at the same time? 


David Holiday 
-------------------------------------------------
San Diego State University






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

Re: Is there a way to broadcast messages to more than one recipient?

Herbert König
Hi David,

short answer:
anArray do: [:each| each message].

One of the things to learn about Smalltalk is it's rich collection protocol.

The fact that I use do: might hint that I should reread the protocol of collections, there maybe something more elegant :-))

Cheers

Herbert

Am 27.12.2013 20:15, schrieb David Holiday:
As far as I can tell, messages have to be directed at a single recipient. Is this the case or, for example, is it possible to blast a message to every member of an Array at the same time? 


David Holiday 
-------------------------------------------------
San Diego State University







_______________________________________________
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: Is there a way to broadcast messages to more than one recipient?

Casey Ransberger-2
I think I heard about something like what you seem to want a bit ago called Announcements. Objects can "sign up" to be notified of a particular event. I dug up a wiki page about it.


Hope this helps,

Casey


On Fri, Dec 27, 2013 at 11:44 AM, Herbert König <[hidden email]> wrote:
Hi David,

short answer:
anArray do: [:each| each message].

One of the things to learn about Smalltalk is it's rich collection protocol.

The fact that I use do: might hint that I should reread the protocol of collections, there maybe something more elegant :-))

Cheers

Herbert

Am 27.12.2013 20:15, schrieb David Holiday:
As far as I can tell, messages have to be directed at a single recipient. Is this the case or, for example, is it possible to blast a message to every member of an Array at the same time? 


David Holiday 
-------------------------------------------------
San Diego State University







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


_______________________________________________
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: Is there a way to broadcast messages to more than one recipient?

Sean P. DeNigris
Administrator
In reply to this post by Herbert König
Herbert König wrote
there maybe something more elegant :-))
aCollection do: #selector. ?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to broadcast messages to more than one recipient?

Tobias Pape

On 04.01.2014, at 14:59, Sean P. DeNigris <[hidden email]> wrote:

> Herbert König wrote
>> there maybe something more elegant :-))
>
> aCollection do: #selector. ?
>

HOM.
http://www.metaobject.com/papers/Higher_Order_Messaging_OOPSLA_2005.pdf

works with selecte/collect/etc.pp

Best
        -Tobias


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

signature.asc (1K) Download Attachment