Simpler is better:
"Declare that when anAnnouncementClass is raised, anObject should
receive the message aSelector.
When the message expects one argument (eg #fooAnnouncement:) the
announcement is passed as argument.
When the message expects two arguments (eg #fooAnnouncement:announcer:)
both the announcement and the announcer
are passed as argument"
And is it not when an an announcement of anAnnouncementClass is raised, .. ?
Announcements are instances.
On 27 May 2013, at 19:03, stephane ducasse <[email protected]> wrote:
>>
>>> Hi guys
>>>
>>> why there is no variant to on:send:to:
>>> "SystemAnnouncer uniqueInstance on: AddedLog send: #foo to: self. "
>>> that pass also the announcement?
>>>
>>> Just because it is better to use on:do;?
>>>
>>> Stef
>>>
>> Huh?
>> It should work do do
>> SystemAnnouncer uniqueInstance on: AddedLog send: #foo: to: self
>>
>> and get the announcement as argument…
>
> Ok now of course since there is a nice comment in the method explaining it I
> could have read it :(
> I will try to write one.
>
> so is this one correct
> "Declare that when anAnnouncementClass is raised, anObject should
> receive the message aSelector.
> When the message is excepting one argument (eg #fooAnnouncement:) the
> announcement is passed as argument.
> When the message is exception two arguments (eg
> #fooAnnouncement:announcer:) the announcement and the annoncer
> are passed as argument"
>
>>
>> or #foo:bar:
>> to get the announcer as well as the announcement.
>>
>> This is one of the reasons cull: is cool! ;)
>>
>> Cheers,
>> Henry
>>
>
>