• 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
Re: Key pressed in NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Key pressed in NSTextField (From: "Tony S. Wu" <email@hidden>)

  • Prev by Date: Key pressed in NSTextField
  • Next by Date: Sleep/power save events
  • Previous by thread: Key pressed in NSTextField
  • Next by thread: Printing for Document-based app
  • Index(es):
    • Date
    • Thread