addObserver confusion
addObserver confusion
- Subject: addObserver confusion
- From: Ken Tozier <email@hidden>
- Date: Wed, 31 Jan 2007 15:44:42 -0500
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:
This email sent to email@hidden