• 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: Overiding keyDown in an NSComboBox
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overiding keyDown in an NSComboBox


  • Subject: Re: Overiding keyDown in an NSComboBox
  • From: Chuck Pisula <email@hidden>
  • Date: Thu, 28 Feb 2002 15:04:00 -0800

When you are editing a text field, or in this case a NSComboBox, the field editor is actually receiving events. So if you want to catch the key strokes you'll have to either replace the field editor with your own subclass of NSTextView, or you can register as a delegate of the combo box and listen to control:textDidChange: / DidBeginEditing: / DidEndEditing:, etc.

-chuck

On Friday, February 8, 2002, at 07:42 PM, John Woodward wrote:

I want to capture keyDown event in an NSComboBox. Subclassing NSComboBox does not work (keyDown never gets called). I suspect this is because it is actually the NSComboBoxCell class (which NSComboBox uses) that is handling the keyDown. However, I don't know how to subclass the NSComboBoxCell that NSComboBox uses. Am I missing something? I have studied all of the documentation about the responder chain.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Overiding keyDown in an NSComboBox (From: John Woodward <email@hidden>)

  • Prev by Date: Re: Random Number
  • Next by Date: Re: Problem with NSComboBox and Formatter
  • Previous by thread: Overiding keyDown in an NSComboBox
  • Next by thread: Launching a URL
  • Index(es):
    • Date
    • Thread