• 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
<no subject>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

<no subject>


  • Subject: <no subject>
  • From: "Tony S. Wu" <email@hidden>
  • Date: Thu, 15 Aug 2002 09:15:27 -0700

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.

  • Follow-Ups:
    • Re: <no subject>
      • From: Jonathan Chaffer <email@hidden>
    • Detect "delete" in text field
      • From: "Tony S. Wu" <email@hidden>
  • Prev by Date: Re: [newbie] Disclosure triangles
  • Next by Date: Re: Getting classes from bundles in an array
  • Previous by thread: Re: [newbie] Disclosure triangles
  • Next by thread: Detect "delete" in text field
  • Index(es):
    • Date
    • Thread