2009/11/1 Tudor Girba <[email protected]>: > 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. >
Thanks Doru. Indeed, its a feature, but not a rule which everyone should follow. In other thread, I had proposed to use field to identify an event type instead of class, and someone said that i'm doing it wrong. While i thinking that the way how the framework identifies events kinds (by default) not always best one, and as i illustrated its not good for everything. > 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 > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
