On 23 April 2011 21:24, Stéphane Ducasse <stephane.ducasse@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:
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.
Okay. But i would discourage from using such methods :)
Stef
-- Best regards, Igor Stasenko AKA sig.
-- Best regards, Igor Stasenko AKA sig.