Programatic binding to a popup button selection
Programatic binding to a popup button selection
- Subject: Programatic binding to a popup button selection
- From: Ken Tozier <email@hidden>
- Date: Sat, 14 Apr 2007 03:41:12 -0400
Hi
I think this is an easy one but I can't seem to find the magic
incantation. I'm trying to set up a programatic binding to a popup
button but when I choose something in the menu, my
observeValueForKeyPath:ofObject:change:context: method doesn't get
called. I tried both of the following without success
[fooPopup addObserver: self
forKeyPath:@"selectedIndex"
options: NSKeyValueObservingOptionNew
context: fooPopup];
[fooPopup addObserver: self
forKeyPath:@"selectedValue"
options: NSKeyValueObservingOptionNew
context: fooPopup];
The bindings info for NSPopupButtons here: http://developer.apple.com/
documentation/Cocoa/Reference/CocoaBindingsRef/index.html seems to
indicate that I should be getting either a selection index or the
title string of the selected object. Anyone see what I'm doing wrong?
Thanks for any help
ken
_______________________________________________
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