• 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
PopUpButton and NSArrayController's selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PopUpButton and NSArrayController's selection


  • Subject: PopUpButton and NSArrayController's selection
  • From: Jesus De Meyer <email@hidden>
  • Date: Wed, 18 Apr 2007 14:44:07 +0200

Hi,

I have a question concerning the bindings between an NSArrayController and an NSPopUpButton. I have succesfully bound the button to get filled with the contents of an array ivar. What I tried to do next is add the class I'm using as an observer for the keypath selection so that when the user changes the selection of the popup, I get this signal and can do other stuff with the current selection.

However, this doesn't work. I use this code: [myArrayController addObserver:self forKeypath:@"selection" ...] and the class respons to the observeValueForKeyPath:ofObject:change:context: method, but the method never gets called.

Currently I'm just setting an action to the popupbutton, without using the observer code. So my question is, is this just not possible or do I have to do something extra? I know it works when I change the selection on an NSTableView, so why doesn't it work on an NSPopUpButton?

Thanks in advance,

Jesus
__________________
Jesus De Meyer
www.edot-studios.com
jesus.edot-studios.com
"creativity in mind"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: About NSEnumerator
  • Next by Date: Re: About NSEnumerator
  • Previous by thread: Re: Inserting localized text to NSTextView
  • Next by thread: Drawing with NSBezierPath
  • Index(es):
    • Date
    • Thread