Re: Handling NSTextField keyboard events
Re: Handling NSTextField keyboard events
- Subject: Re: Handling NSTextField keyboard events
- From: Yann Bizeul <email@hidden>
- Date: Mon, 31 May 2004 11:31:20 +0200
Instead of keyDown, try using
- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
since arrow keys are special keys not handled by keyDown.
Subclass this in your NSTextField subclass and that should work
Best regards,
Le 31 mai 04, ` 08:37, William LeFevre a icrit :
>
Hello,
>
I'm creating a small application for calculating monthly mortgage
>
payments. The application uses a number of NSTextFields, all of which
>
are used to input numerical values. The default behavior for the up
>
and down arrows is to move the insertion point to the beginning and
>
end of the current string. I would like to override this behavior to
>
instead increment and decrement the value.
>
I'm at loss. I can't find a delegate which looks appropriate.
>
Subclassing NSTextField and overriding keyDown: doesn't work because
>
the text field isn't the first responder. My current suspicion is that
>
I need to create a custom field editor which looks like a scary
>
proposition.
>
Can anyone point me in the right direction?
>
>
Thanks,
>
William
>
_______________________________________________
>
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.
>
>
>
--
Yann Bizeul - yann at tynsoe.org
http://projects.tynsoe.org/
_______________________________________________
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.