Re: NSPopupUpButton not showing checked menu items
Re: NSPopupUpButton not showing checked menu items
- Subject: Re: NSPopupUpButton not showing checked menu items
- From: Steve Christensen <email@hidden>
- Date: Sat, 22 Nov 2008 21:45:34 -0800
On Nov 22, 2008, at 6:38 PM, Kyle Sluder wrote:
On Sat, Nov 22, 2008 at 9:20 PM, Steve Christensen
<email@hidden> wrote:
In IB I created a NSPopUpButton configured as pulldown with a
static menu. I
bound its selectedTag binding to a method on my window controller.
(I also
tried binding selectedIndex with the same results.) When I run my
code and
select various of the items in the button's menu, none of the
items are
shown as checked. Or if one of the menu items was left "selected"
in IB from
when items were added to the menu, that item is permanently checked.
You bound "selectedTag" to a method? Bindings are done to keypaths.
Of course, they key can be implemented using KVO-compliant accessor
and mutator methods -- is this how you have done it?
Sorry, I was inaccurate. Yes, I specified that the NSPopupButton's
selectedTag binding will get/set its value based on a key path
associated with my window controller class (also nib file owner). In
my particular case, the binding is to a getter/setter pair of methods
since I have to do a little more than simply getting or setting an
instance variable.
When I click on the popup and change the selection, the result I'm
seeing is that my controller's setter method is being called, that
the popup's selected item index is being changed correctly (at least
NSLog says so), but that the currently selected menu item isn't checked.
steve
_______________________________________________
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