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 14:38:22 -0800
Randall Meadows wrote:
On Feb 13, 2008, at 1:41 PM, Kyle Sluder wrote:
On Feb 13, 2008 12:37 PM, John Stiles <email@hidden> wrote:
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
Except this is an NSTextFIELD, not -View (well, actually, NSComboBox,
but that is an NSTextField).
Right, I am well aware of that.
Please look up field editors and how they work. It's a pretty important
concept for Cocoa development.
enters the window. To accomplish your goal, you need to change the
event dispatching logic, which is not a property of the first
responder, but the mechanism that gets the event to it.
instead of catching the event as it
Just for the record, that is now what I'm doing; I had subclassed
NSWindow anyway, so it was trivial to add the sendEvent: override in
there as well. And, it works perfectly; much better than my hack.
Well, I'm glad you have a working technique. It's probably a better way
to go.
Still, I recommend you look up the field editor in the docs.
_______________________________________________
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