I have a data entry sheet that has the Return key set as the key equivalent for 
the OK button, to dismiss the sheet.
The sheet has a couple of NSComboBox controls on it.
When the combobox dropdown is showing, I want the user to be able to use the 
arrow keys to pick an item and hit the Return key to choose the item without 
that triggering the OK button and closing the sheet.
So, in the comboBoxWillPopUp notification I set the button's key equivalent to 
@"".
Works great.
Then, in the comboBoxWillDismiss notification, I set the key equivalent back to 
@"\r".
Unfortunately, when I do this, the OK button still gets activated by the Return 
key the user entered to select a combobox item.
I tried moving the call to re-enable the key equivalent to 
the textDidEndEditing notification for the combo box, but the problem persists.
Where/when can I re-enable the key equivalent to avoid this problem?
...Eric...
Company site: http://www.infusionsofgrandeur.comDeveloper Blog: 
http://www.onelazyprogrammer.com




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to