Re: How to test if object is KVO observer?
Re: How to test if object is KVO observer?
- Subject: Re: How to test if object is KVO observer?
- From: "I. Savant" <email@hidden>
- Date: Wed, 15 Apr 2009 16:09:10 -0400
On Wed, Apr 15, 2009 at 3:51 PM, Andreas Eriksson <email@hidden> wrote:
> Is there a way to test if an object is a KVO observer of a different object?
> Something like -[a isObserving:b forKeyPath:@"akeypath"]?
The easy answer: Look up NSKeyValueObserving protocol's
-observationInfo and check against that.
The not-so-easy answer: it depends on what you're trying to
accomplish. Why are you interested in this information? This is one of
those questions that make me think there may be a better approach to
what you're trying to do. I may be wrong. :-)
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden