• 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
Re: Binding and NSPopUpButton selectItemAtIndex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding and NSPopUpButton selectItemAtIndex


  • Subject: Re: Binding and NSPopUpButton selectItemAtIndex
  • From: Michael Lutz <email@hidden>
  • Date: Mon, 7 Feb 2005 22:42:28 +0100

On Feb 6, 2005, at 23:24, Scott Anguish wrote:


On Feb 5, 2005, at 6:00 PM, Michael Lutz wrote:

Hi List,
I have a NSPopUpButton to which I bound the NSString "selectedPort" using an NSObjectContoller and the "selectedValue" binding (Controller Key: "selection").
Everything is working fine (selectedPort gets updated when the selection changes) as long the changes are made using the GUI. But if NSPopUpButton's selectItemAtIndex is called, then selectedPort still has it's old value.
As I am fairly new to bindings I am wondering if those do not work if the selection is changed programatically?

right. they don't. Changing the control programmatically does not update value.


    instead, set the value directly, and the control will update.


Thanks for the answer Scott, this clears things up.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Binding and NSPopUpButton selectItemAtIndex (From: Michael Lutz <email@hidden>)
 >Re: Binding and NSPopUpButton selectItemAtIndex (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: "Subclass" NSMutableArray basic concept?
  • Next by Date: Re: What's the best way to get a Shortcut List to look like it does in Mail.app?
  • Previous by thread: Re: Binding and NSPopUpButton selectItemAtIndex
  • Next by thread: NSDraggingSource & Delegate?
  • Index(es):
    • Date
    • Thread