Re: NSTextView question
Re: NSTextView question
- Subject: Re: NSTextView question
- From: Andy Lee <email@hidden>
- Date: Sun, 14 Apr 2002 12:03:12 -0400
At 7:01 AM -0400 4/14/02, email@hidden wrote:
i'm a newbie to cocoa and i'd like to know how to tell an NSTextField to send
an action when the tabulation key is pressed. can u help me ?
btw, i didn't manage to find how to do that
Assuming you did mean NSTextField and not NSTextView, you can
implement the following method in the text field's delegate:
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{
// ... whatever ...
}
This method will be invoked when you tab out of the text field. You
can read more about it in the "Methods implemented by the delegate"
section of the docs for NSControl. (NSTextField is a subclass of
NSControl.)
--Andy
_______________________________________________
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.