On Jun 29, 2009, at 6:09 PM, Tim Schmidt wrote:

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?

This is probably due to a known bug that will not likely ever be fixed. In your particular case, it doesn't matter, as the value will have been changed before you receive the observer message.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to