Re: RegEx in cocoa, and where to dl PB+IB?
Re: RegEx in cocoa, and where to dl PB+IB?
- Subject: Re: RegEx in cocoa, and where to dl PB+IB?
- From: Cryx <email@hidden>
- Date: Sat, 27 Apr 2002 21:37:26 -0500
On Saturday, April 27, 2002, at 09:17 PM, Joel Rosenblum wrote:
On an unrelated note, actually regarding programming this time, I
subclassed NSScrollView so that I could override the keyDown message,
but it doesn't get called when I press a key. If I change the name to
"keyUp" it does get called, but I want it to get called on keyDown so
that I can decide whether or not to allow the key to go through to the
editfield. Anyone else ever run into this problem?
When the scroll view is selected, it hands off first responder to a
field editor. Thus the field editor, not the view, receives the keyDown
events. It's a rather irritating design in that it makes it difficult
to filter raw key events.
If I recall correctly, you can receive delegate notifications when the
window needs a field editor. You can use these to substitute your own
editor subclass with a keyDown method. In my own case, it proved to be
much simpler to use a plain NSTextField and catch the keyDown events.
Daryn
_______________________________________________
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.