Re: addObserver confusion [SOLVED]
Re: addObserver confusion [SOLVED]
- Subject: Re: addObserver confusion [SOLVED]
- From: Ken Tozier <email@hidden>
- Date: Wed, 31 Jan 2007 16:09:23 -0500
I'm putting the obsered changes into an NSInvocation and it turns out
I was passing the object rather than the object address.
Turns out the problem was that I wasn't passing
On Jan 31, 2007, at 3:44 PM, Ken Tozier wrote:
Hi
I'm setting up some observers for an object's properties to watch
for and return NSKeyValueObservingOptionOld
NSKeyValueObservingOptionNew but am having trouble determining the
type of the resultant values in my observeValueForKeyPath method.
The observed properties are BOOLs but I have no idea what I'm being
passed. Here's what I've tried
// this prints to the run log fine which led me to believe the
returned values were objects.
NSLog(@"Observed changes: old value: %@, new value: %@", [inChange
objectForKey: NSKeyValueChangeOldKey], [inChange objectForKey:
NSKeyValueChangeNewKey]);
Next I tried this to see if I could figure out the class
NSLog(@" new value type = ", NSStringFromClass([[inChange
objectForKey: NSKeyValueChangeNewKey] class]));
Which prints as the very helpful line
new value type =
So what exactly does observeValueForKeyPath return?
TIA
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40comcast.net
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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