Hi Keith, thanks for your reply.
I've tried your implementation a bit this way:
| testAnn |
testAnn := WAAnnouncer with: { 1 . 2 }.
testAnn
������ subscribe: AnnouncementMockA
������ send: #value:
������ to: ExampleObject new.
...
testAnn announce: AnnouncementMockA.
but in ExampleObject>>value: anObject
anObject happens to be an AnnouncementMockA and not { 1 . 2 } which is what I'm trying to achieve. I know I can do anything with the AnnouncementMockA at signalling time, but I have the collection { 1 . 2 } only at registering time.
Do you have an example of this behavior with your implementation?
Just thinking, I'm wondering why a subscriber must be a class :
������ eventSource
������ ������ subscribe: AnnouncementMockA
�������������� send: #value:
�������������� to: anObject.
but not an instance, it could be:
������ eventSource
������ ������ subscribe: ( AnnouncementMockA named: 'a' with: argument )
�������������� send: #value:
�������������� to: anObject.
this way would prevent announcement class explosion too.
Hern��n
Your announcement is an object of your own design. You can put
On 4 Nov 2009, at 21:50, Hern��n Morales Durand wrote:
> Hi, I'm using AXAnnouncements but I suppose this question is valid
> for other implementations. In SASE (the "triggerEvent" event
> framework) one could subscribe an event for an object specifying an
> argument at registration time:
>
> eventSource
> �� when: #eventName send: #aSelector to: anObject with: argument
>
> I've looked at Announcements and it seems this kind of registration
> isn't supported without using blocks. Am I right?
> Before getting into details I just want to check. What people do to
> specify an argument at registration time with Announcements?
>
> Cheers,
>
> Hern��n
parameters as instance variables in your announcement subclass.
The default implementation does not support the ability to send
methods to objects in the manner that you describe.
My Wandering Announcements package does have an enhancement to support
this,
it is available in the squeaksource.com/Jetsam repository.
Keith
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project