[Pharo-project] is there a way to know whether an object is registered to an announcer?
stephane.ducasse at inria.fr
Sat Apr 23 20:24:28 CEST 2011
> 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:
yes much better.
> May i ask why you need to test it?
sure I'm trying to understand why I have 6 instances of RPackageOrganizer and also the code of cyrille.
So knowing if a given instance is registered is important for me to debug and also to write some tests.
> Usually you don't need to test who subscribed to what. And if you do,
> then i suspect there are some design mistake.
Exactly, still the API should let me do what I have to do when I need it.
> Best regards,
> Igor Stasenko AKA sig.
More information about the Pharo-project