Detect "delete" in text field
Detect "delete" in text field
- Subject: Detect "delete" in text field
- From: "Tony S. Wu" <email@hidden>
- Date: Thu, 15 Aug 2002 09:24:56 -0700
I apologize I forgot to put in subject.
Here is my question again.
I have a NSTextField and I'd like to be informed when user pressed "delete"
key.
So I use this delegate method (thanks to the help before):
- (BOOL)control:(NSControl *)control
textView:(NSTextView *)textView
doCommandBySelector:(SEL)commandSelector
{
if (commandSelector == @selector(deleteBackward:))
NSLog(@"Blah!!");
return YES;
}
I did see the log, but the problem is the delete key isn't processed
anymore.
Would it be easier if I subclass it or is there other way to get around with
it?
Thanks.
Tony S. Wu
email@hidden
"Nope, this world ain't perfect. But at least I know it's not because of
me."
_______________________________________________
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.
References: | |
| ><no subject> (From: "Tony S. Wu" <email@hidden>) |