8/14/08 6:45 PM, also sprach [EMAIL PROTECTED]: > [[NSNotificationCenter defaultCenter] addObserver:self selector: > (<...>) name:kMyConstant1 object:<theObjectOfInterest>]; > > My observer doesn't receive notifications from kMyConstant2 even > though it's defined to be the same literal string as kMyConstant1. > > As it turns out I can get the functionality I need by simply > subscribing to both notifications, but I was trying to avoid linking > in the headers for all the object types that are contained by my data > management code - the UI for that model doesn't otherwise "need to > know" what object types they are, as apart from this one notification, > they conform to a common protocol.
What if we bark up the tree of the "object" parameter? If you are passing this parameter, you will only receive notifications from the specific object. It sounds like you are working with two different objects that you want to receive notifications for. In this case, you will have to pass nil for the object, and possibly test the object for interest in your notification method. Best, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
