• 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
NSTableView, NSComboBoxCell and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView, NSComboBoxCell and bindings


  • Subject: NSTableView, NSComboBoxCell and bindings
  • From: Ken Victor <email@hidden>
  • Date: Thu, 12 Apr 2007 11:49:36 -0700

i'm having a problem getting the bindings right for an NSTableView with one column having a NSComboBoxCell. the problem can be viewed simply in interface builder as follows:

1) drag a table into an empty window.
2) drag an array controller to the nib
3) configure the array controller as follows:
object class: NSMutableDictionary
Automatically prepares content
Editable
Preserves selection
Selects inserted objects
Clears filter predicate on insertion
4) bind the value of the first column of the table to arrangedObjects.name
5) bind the value of the second column of the table to arrangedObjects.comment
6) drag a combo box cell onto the first column
7) configure the combo box cell as follows:
Editable
Enabled
Completes
8) enter the following "values" for the popup data list of the combo box:
abc
abc def
def
def ghi
ghi
9) run the nib (in IB)
10) double click first column of first row
11) type a down arrow to "open" the combo box popup and use the down arrow key to select an item from the list.
12) type a return to select the highlighted item
13) tab to the next column


the value of the first column of the first row reverts to empty!!!

note that if you open the popup by clicking on the combo box button it works properly. also note that typing into the combo box cell also works properly (including completion). ie, the problem only shows up if making a selection from the combo box popup (using keyboard or mouse) while the text field of the combo box is selected as the first responder.

i've tried additionally binding the value of the combo box to arrayController.selection.name to no avail; and i've also tried only binding the combo box value, but not the table column value.

could someone please suggest the proper way to set up this type of bindings and/or point me to some example code.

thanx,
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


  • Prev by Date: Re: Can a value transformer get its own registration name?
  • Next by Date: Re: Can a value transformer get its own registration name?
  • Previous by thread: Re: hey, who's enabling my window's close button?
  • Next by thread: ScriptEditor thinks my command is a variable
  • Index(es):
    • Date
    • Thread