Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

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

Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

Stéphane Ducasse
I'm a group of announcements. I can be used to register action to a group of announcement instead of enumerating them one by one.


On Dec 9, 2011, at 10:46 PM, [hidden email] wrote:

> 93 classes done
> 802 classes remaining
> Continuing in Announcements...
>
> Today:  AnnouncementSet
>
>
> Comment Of The Day Contest - One Day One Comment
> Rules:
> #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s).
> #2: If you cannot comment it, deprecate it.
> Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
>
> p.s. this message was sent from a pharo image. Did you know you could easily do that?!
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

Igor Stasenko
which is pretty useless IMO.
there is no any performance benefit for using groups over single ones.

On 9 December 2011 23:54, Stéphane Ducasse <[hidden email]> wrote:

> I'm a group of announcements. I can be used to register action to a group of announcement instead of enumerating them one by one.
>
>
> On Dec 9, 2011, at 10:46 PM, [hidden email] wrote:
>
>> 93 classes done
>> 802 classes remaining
>> Continuing in Announcements...
>>
>> Today:  AnnouncementSet
>>
>>
>> Comment Of The Day Contest - One Day One Comment
>> Rules:
>> #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s).
>> #2: If you cannot comment it, deprecate it.
>> Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
>>
>> p.s. this message was sent from a pharo image. Did you know you could easily do that?!
>>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

Sean P. DeNigris
Administrator
Igor Stasenko wrote
which is pretty useless IMO.
The collaborative book says:
If you want to register the same action for multiple events, simply create an AnnouncementSet using a comma:

Parent>>initialize
    super initialize.
    self session announcer on: AddChild, RemoveChild do: [:it | self changeChild: it child]
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

Stéphane Ducasse
I would not say useless may be you need the composite and you do not need  to repeat AddChild, RemoveChild all the times but use the composite


>
> Igor Stasenko wrote
>>
>> which is pretty useless IMO.
>>
>
> The collaborative book says:
>
> If you want to register the same action for multiple events, simply create
> an AnnouncementSet using a comma:
>>
>> Parent>>initialize
>>    super initialize.
>>    self session announcer on: AddChild, RemoveChild do: [:it | self
>> changeChild: it child]
>
> --
> View this message in context: http://forum.world.st/Re-Pharo-users-COTDC-94-AnnouncementSet-tp4178427p4179008.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

Igor Stasenko
On 10 December 2011 10:41, Stéphane Ducasse <[hidden email]> wrote:
> I would not say useless may be you need the composite and you do not need  to repeat AddChild, RemoveChild all the times but use the composite
>
>

well.. usually a different events suppose different reactions to them,
otherwise why care making lot event kinds if you handle them
similarily?

>>
>> Igor Stasenko wrote
>>>
>>> which is pretty useless IMO.
>>>
>>
>> The collaborative book says:
>>
>> If you want to register the same action for multiple events, simply create
>> an AnnouncementSet using a comma:
>>>
>>> Parent>>initialize
>>>    super initialize.
>>>    self session announcer on: AddChild, RemoveChild do: [:it | self
>>> changeChild: it child]
>>
>> --
>> View this message in context: http://forum.world.st/Re-Pharo-users-COTDC-94-AnnouncementSet-tp4178427p4179008.html
>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

Stéphane Ducasse
I do not know but this is really not a problem to have a event group class
we can discarded in no time. So I would not bother with it.

On Dec 11, 2011, at 8:07 AM, Igor Stasenko wrote:

> On 10 December 2011 10:41, Stéphane Ducasse <[hidden email]> wrote:
>> I would not say useless may be you need the composite and you do not need  to repeat AddChild, RemoveChild all the times but use the composite
>>
>>
>
> well.. usually a different events suppose different reactions to them,
> otherwise why care making lot event kinds if you handle them
> similarily?
>
>>>
>>> Igor Stasenko wrote
>>>>
>>>> which is pretty useless IMO.
>>>>
>>>
>>> The collaborative book says:
>>>
>>> If you want to register the same action for multiple events, simply create
>>> an AnnouncementSet using a comma:
>>>>
>>>> Parent>>initialize
>>>>    super initialize.
>>>>    self session announcer on: AddChild, RemoveChild do: [:it | self
>>>> changeChild: it child]
>>>
>>> --
>>> View this message in context: http://forum.world.st/Re-Pharo-users-COTDC-94-AnnouncementSet-tp4178427p4179008.html
>>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] [COTDC] 94 - AnnouncementSet

Tudor Girba-2
In reply to this post by Igor Stasenko
Hi,

On 11 Dec 2011, at 08:07, Igor Stasenko wrote:

> On 10 December 2011 10:41, Stéphane Ducasse <[hidden email]> wrote:
>> I would not say useless may be you need the composite and you do not need  to repeat AddChild, RemoveChild all the times but use the composite
>>
>>
>
> well.. usually a different events suppose different reactions to them,
> otherwise why care making lot event kinds if you handle them
> similarily?

Often the UI is built after/independently from the model. You want to have the model raise fine grained announcements to enable the layers on top, but sometimes it is easier in the UI to refresh everything whenever something happens.

Cheers,
Doru



>>>
>>> Igor Stasenko wrote
>>>>
>>>> which is pretty useless IMO.
>>>>
>>>
>>> The collaborative book says:
>>>
>>> If you want to register the same action for multiple events, simply create
>>> an AnnouncementSet using a comma:
>>>>
>>>> Parent>>initialize
>>>>    super initialize.
>>>>    self session announcer on: AddChild, RemoveChild do: [:it | self
>>>> changeChild: it child]
>>>
>>> --
>>> View this message in context: http://forum.world.st/Re-Pharo-users-COTDC-94-AnnouncementSet-tp4178427p4179008.html
>>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>

--
www.tudorgirba.com

"Every now and then stop and ask yourself if the war you're fighting is the right one."