Basic KVO question
Basic KVO question
- Subject: Basic KVO question
- From: Tim Schmidt <email@hidden>
- Date: Mon, 29 Jun 2009 17:09:43 -0700
Hi everyone,
first of all, thanks for reading this. I have a basic KVO question. In
one of my NIBs I have an NSArrayController and a NSSegmentedControl
with add/remove segments for the array of said controller. Now I want
to enable the remove-segment according to the controllers canRemove
message. I've set the NIB's viewcontroller as an observer of the
arraycontroller's canobserve property as follows:
[statesController addObserver:self forKeyPath:@"canRemove"
options:NSKeyValueObservingOptionNew
context:PED_CAN_REMOVE_STATE_CONTEXT];
and receive the obligatory change notifications alright, but the
change dictionary always contains an NSNull instance for the
NSKeyValueChangeNewKey instead of the NSNumber bool subclass I would
expect. Am I doing something wrong here?
_______________________________________________
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