• 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
Basic KVO question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Basic KVO question
      • From: Kyle Sluder <email@hidden>
    • Re: Basic KVO question
      • From: Keary Suska <email@hidden>
  • Prev by Date: Parsing question about NSXMLParser
  • Next by Date: Rendering a fixed-width text
  • Previous by thread: Re: Parsing question about NSXMLParser
  • Next by thread: Re: Basic KVO question
  • Index(es):
    • Date
    • Thread