Re: keyboard events
Re: keyboard events
- Subject: Re: keyboard events
- From: Karsten <email@hidden>
- Date: Tue, 11 Sep 2007 13:10:34 +0200
you may want to create a subclass of NSTextField and in interface
builder you change the class of the textfield to your own class. in
this class you can implement the methods like keyUp:
Kind Regards
Karsten
Am 09.09.2007 um 07:13 schrieb David Rio Deiros:
Hi,
I have a very basic cocoa application that has an NSTextField, a
couple of buttons and a scroll view.
The user enters some word in the textfield, then clicks one of the
buttons and the application writes
something to the scroll view. The other button just cleans the
scroll view.
The application works fine, but now I want to add some code so after
entering the word the user can
hit <enter> and then the results get generated in the scroll view
(same as if he/she press the "execute"
button).
I have been reading a little bit about keyboard events and I am kind
of confuse. It seems that I have
to have an NSView class since its the one that implements
NSResponder, which is the one that allows handling
keyboard events.
I have two classes:
@interface AppController : NSObject
and
@interface Speller : NSObject
As you can see both are NSObjects.
What is the best way to add keyboard events to my application? Can
you point me to some code example or
document where I figure this out?
Thanks in advance for your help,
David
_______________________________________________
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
_______________________________________________
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