• 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
Is NSPopUpButton KVO compliant?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is NSPopUpButton KVO compliant?


  • Subject: Is NSPopUpButton KVO compliant?
  • From: Mark Lilback <email@hidden>
  • Date: Mon, 15 May 2006 22:50:45 -0500

I'm trying to programatically observe when the selected item of a NSPopUpButton (and/or NSPopUpButtonCell) changes. I've tried:

[[popUp cell] addObserver: self forKeyPath: @"selectedItem" options: 0 context: nil];
[[popUp cell] addObserver: self forKeyPath: @"indexOfSelectedItem" options: 0 context: nil];
[popUp addObserver: self forKeyPath: @"selectedItem" options: 0 context: nil];
[popUp addObserver: self forKeyPath: @"indexOfSelectedItem" options: 0 context: nil];


But when the popup value changes, my observeValueForKeyPath:ofObject:change:context: method is never called.

Is NSPopUpButton[Cell] not KVO-compliant? Or is there another key I should be observing?

_____________________________________________________________________
                                    "The best assumption to have
Mark J. Lilback                      is that any commonly held
<email@hidden>                   belief is wrong." -- Ken Olsen,
http://www.lilback.com/              founder, Digital Equip. Corp.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Is NSPopUpButton KVO compliant?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: What's so special about NSString literals? (RE: memory management)
  • Next by Date: CGDisplayFade maximum length in seconds?
  • Previous by thread: Re: What's so special about NSString literals? (RE: memory management)
  • Next by thread: Re: Is NSPopUpButton KVO compliant?
  • Index(es):
    • Date
    • Thread