• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Basic KVO question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic KVO question


  • Subject: Re: Basic KVO question
  • From: Keary Suska <email@hidden>
  • Date: Wed, 1 Jul 2009 15:45:10 -0600

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 (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


References: 
 >Basic KVO question (From: Tim Schmidt <email@hidden>)

  • Prev by Date: libcurl -- how to write a callback?
  • Next by Date: libSystem.B.dylib
  • Previous by thread: Basic KVO question
  • Next by thread: Re: Basic KVO question
  • Index(es):
    • Date
    • Thread