[Pharo-project] is there a way to know whether an object is registered to an announcer?

Igor Stasenko siguctua at gmail.com
Sat Apr 23 17:49:42 CEST 2011


On 23 April 2011 13:58, Stéphane Ducasse <Stephane.Ducasse at inria.fr> wrote:
> hi guys
>
>
> is there  a way to know whether an object is registered to an announcer?
>
> I propose
>
> isRegistering: anObject
>
> registry subscriptionsOf: anObject  do: [:each | ^ true].
> ^ false
>
>

then more appropriate would be #hasSubscriber:

May i ask why you need to test it?
Usually you don't need to test who subscribed to what. And if you do,
then i suspect there are some design mistake.


-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Pharo-project mailing list