• 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
Binding NSPopUpButton selectedIndex with custom view for menu item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: help system structure
  • Next by Date: Re: NSEvent timestamp is zero
  • Previous by thread: Re: wait for sheet result
  • Next by thread: Yet another NSTreeController memory issue
  • Index(es):
    • Date
    • Thread