https://pharo.fogbugz.com/default.asp?10781
On 28 May 2013 04:53, Igor Stasenko <[email protected]> wrote: > On 27 May 2013 19:05, stephane ducasse <[email protected]> wrote: >> Igor >> >> can you add a bug entry and propose a fix? >> So that we do not forget. >> > yes. > >> Stef >> >> >>>>>> >>>>>> >>>>>>> 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… >>>>>> >>>>>> or #foo:bar: >>>>>> to get the announcer as well as the announcement. >>>>>> >>>>>> This is one of the reasons cull: is cool! ;) >>>>>> >>>>>> Cheers, >>>>>> Henry >>>>>> >>>>> >>>>> Speaking of SystemAnnouncer… >>>>> In the latest dev image I've got: >>>>> SystemAnnouncer uniqueInstance numberOfSubscriptions 1327 >>>>> >>>>> Most of which are weak subscriptions for RecentMessageList. >>>>> >>>>> RecentMessageList class >> cleanUp >>>>> >>>>> self allInstancesDo: [:rml| rml initialize]. >>>>> >>>>> is clearly wrong, as initialize registers subscriptions for the >>>>> announcements (thus introducing duplicates), done every time you shut >>>>> down the image… >>>>> >>>>> maybe it should do >>>>> self resetUniqueInstance instead? >>>>> >>>> >>>> i think >>>> RecentMessageList>>registerToAnnouncements >>>> >>>> should include >>>> >>>> SystemAnnouncer uniqueInstance unsubscribe: self. >>>> >>>> >>>> like that, even if you call #initialize multiple times, it won't >>>> create duplicates. >>>> >>> >>> tried it, with the change: >>> >>> SystemAnnouncer uniqueInstance numberOfSubscriptions 467 >>> >>> RecentMessageList cleanUp >>> >>> SystemAnnouncer uniqueInstance numberOfSubscriptions 93 >>> >>>> -- >>>> Best regards, >>>> Igor Stasenko. >>> >>> >>> >>> -- >>> Best regards, >>> Igor Stasenko. >>> >> >> > > > > -- > Best regards, > Igor Stasenko. -- Best regards, Igor Stasenko.
