Re: Detecting keyDown in a NSTextField? [As an event?]
Re: Detecting keyDown in a NSTextField? [As an event?]
- Subject: Re: Detecting keyDown in a NSTextField? [As an event?]
- From: "Jean-Olivier Lanctôt-D." <email@hidden>
- Date: Wed, 8 Oct 2003 06:55:21 -0400
Yes, but there MUST be a way to intercept the event?!
controlTextDidChange will not tell me about keys that don't convert as
characters....
I want to know when tab or left, right, up, down are pushed... there
must be a way?
Thanks!
On Wednesday, October 8, 2003, at 01:35 AM, Henry McGilton wrote:
On Tuesday, October 7, 2003, at 06:33 PM, Jean-Olivier Lancttt-D.
wrote:
Hi List!
I have an NSTextField, and I want to be notified whenever a key gets
pushed.
Normally, I'd go like that in my brain.
NSTextField is a NSView so it gets keyDown:
so I subclass keydown and NSLog something. but it never gets NSLogged.
I override acceptsFirstResponder to return YES, it doesnt work...
It's prolly because of the cell inside the view? But NSCell has no
keyDown method...
So what do I do??
I'm a bit of a newbie when it comes to responder stuff... so please
help me ;)
Look at the documentation for NSControl and see the delegate methods
controlTextDidBeginEditing, controlTextDidChange, and
controlTextDidEndEditing.
Those are good starting points for figuring out when stuff is happening
in a text field.
Best Wishes,
........ Henry
===============================+============================
Henry McGilton, Boulevardier | Trilithon Software
Objective-C/Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden | http://www.trilithon.com
|
===============================+============================
_______________________________________________
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.