My application has an NSTableView with a column whose cell is an 
NSComboBoxCell.  Just to keep things simple (for the purpose of explanation 
here), let's assume that the combo box cell is configured with a list of items 
via the IB Inspector.  The table view is nothing special -- just the standard 
NSTableView.  The table column value is simply bound to 
arrangedObjects.somePropertyName on an NSArrayController that holds the objects 
in the table.

Suppose the user adds a row to the table, begins editing the row, and tabs over 
to the combo box column.  Without typing any text into the cell, the user 
presses the down arrow key on the keyboard.  As expected, the combo box's menu 
opens and the up/down arrow keys can be used to change the selected item.  If 
the user selects an item from the menu and presses Return, the combo box menu 
disappears, but the selected item *is not* set as the value of the table 
column. 

On the other hand, suppose that the user adds a row to the table, begins 
editing, tabs over to the combo box column, and types some text into the cell 
first, then hits the down arrow key on the keyboard.  Once again the combo 
box's menu appears, as expected.   However, when the user selects an item from 
the menu and hits Return, the selected item *is* set as the value of the table 
column.

Can someone explain this behavior to me?

Using the mouse to open the combo box menu and select an item works as expected 
-- the selected item is set as the value of the table column.

Using an NSComboBox control outside of a table column, the keyboard navigation 
of the combo box's menu works as expected -- whether or not the user has 
entered some text into the text field, if the menu is opened (using down arrow 
on the keyboard) and an item is selected followed by Return, the selected item 
is set as the value of the field.







_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to