Binding NSPopUpButton selectedIndex with custom view for menu item
Binding NSPopUpButton selectedIndex with custom view for menu item
- Subject: Binding NSPopUpButton selectedIndex with custom view for menu item
- From: Tom <email@hidden>
- Date: Thu, 7 Jan 2010 08:41:02 +0100
I have a NSPopUpButton with a menu of 3 options. The second option has a
view assigned (in IB). The view properly updates the button's selection when
clicked (through mouseDown: override). However when I bind the button's
selectedIndex it doesn't work for my view. The binding properly updates the
rest of the options in my model, but if my custom view is selected, previous
value is kept.
The code within my custom view that selects the item is:
[parentButton selectItem:[self enclosingMenuItem]];
It looks like KVO is not being raised when programmatically changing
button's selection. Any help would be appreciated.
Thanks, Tom
_______________________________________________
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