Re: Intercepting keyDown event from NSComboBox
Re: Intercepting keyDown event from NSComboBox
- Subject: Re: Intercepting keyDown event from NSComboBox
- From: John Stiles <email@hidden>
- Date: Wed, 13 Feb 2008 09:37:26 -0800
OK, I looked at this a little more closely because I was curious and it
is probably an issue I will eventually need to grapple with as well :)
Recently, if there's a nonstandard way of doing things, I've been having
to do it!
So the root issue is this: there is a -keyDown: event being generated,
but the combo box isn't the receiver. The receiving object is the field
editor!
There are technotes on returning a custom field editor which you can
look at. All you really need to do is subclass NSTextView and implement
a -keyDown: or -insertText: in your subclass, then provide that text
view as the field editor for the combo box. That should solve it.
Good luck.
Randall Meadows wrote:
On Feb 12, 2008, at 7:18 PM, John Stiles wrote:
You can subclass NSComboBox and override -keyDown: or -insertText:.
Well, I didn't try insertText:, but keyDown did not ever get called.
_______________________________________________
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:
This email sent to email@hidden