PopUpButton and NSArrayController's selection
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