Re: Key pressed in NSTextField
Re: Key pressed in NSTextField
- Subject: Re: Key pressed in NSTextField
- From: Douglas Davidson <email@hidden>
- Date: Tue, 13 Aug 2002 12:41:28 -0700
On Tuesday, August 13, 2002, at 12:30 PM, Tony S. Wu wrote:
I want to be informed when "delete" key is pressed in one of my text
field.
I tried the keyDown method.
And doesn't seem to work.
Can anyone give me some advice?
Here's some advice: don't subclass when you can use delegation. Use
the delegate method
- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView
doCommandBySelector:(SEL)commandSelector;
and look for the selector @selector(deleteBackward:) or whatever others
you may be interested in.
Douglas Davidson
_______________________________________________
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.