Indeed, the main and only goal of Announcement is to provide an object- 
oriented (Exception-like) way to handle notifications.

I have used the Announcements implementation of Lukas on several  
occasions and I did not feel the need for anything else.

You indeed should subclass Announcement for any specific announcement,  
but that is not a drawback, it is a nice feature. If you want to have  
an announcement that you want to identify by a special single field,  
you are free to implement that in one announcement class on top.

Cheers,
Doru


On 1 Nov 2009, at 17:08, Lukas Renggli wrote:

>> Obviously i can't. Because if i make all of the tree to be a subclass
>> of LoggedAnnouncement, then all of them
>> will be logged, while i want only some of them.
>
> You are missing the point of announcements: they are not supposed to
> do anything, they are only supposed to notify interested parties about
> something. It is the sole responsibility of the interested party to
> register for announcements. If somebody is interested logging some
> announcement, then this interested party should declare that wish. The
> announcement itself shouldn't care.
>
> Lukas
>
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"Some battles are better lost than fought."




_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to