• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Detect "delete" in text field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: Getting classes from bundles in an array
  • Next by Date: Re: <no subject>
  • Previous by thread: <no subject>
  • Next by thread: Re: <no subject>
  • Index(es):
    • Date
    • Thread