Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting when NSComboBox text changed by list



Dave Fernandes wrote:

delegate method: comboBoxSelectionDidChange

No, that's not right. The comboBoxWillDismiss delegate method is better, though it gives "false positives".


Consider this scenario:

1. I open the pop-up list.
2. I use an arrow key to change the selected item.
3. I press the return key to choose the item.

At step 2, comboBoxSelectionDidChange is called, but the text field has not yet changed. At step 3, comboBoxWillDismiss is called after the text has changed, though the documentation certainly doesn't make it clear that the delegate call comes after the text change.

On the other hand, if step 3 is replaced by

3a. I click away from the combo box, dismissing the list without choosing from it

then comboBoxWillDismiss is called though the text has not changed.


On Oct 31, 2008, at 3:34 PM, James Walker wrote:

How can I be notified when the text of an NSComboBox is changed by choosing something from the list? Oddly, my controlTextDidChange: delegate method is not called in that case, though it is called if I type in the field. None of the NSComboBox notifications or delegate methods look appropriate.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________


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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden



This email sent to email@hidden




--
  James W. Walker, Innoventive Software LLC
  <http://www.frameforge3d.com/>
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Detecting when NSComboBox text changed by list (From: James Walker <email@hidden>)
 >Re: Detecting when NSComboBox text changed by list (From: Dave Fernandes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.