• 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
Make NSTextField only send action on <Return>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make NSTextField only send action on <Return>


  • Subject: Make NSTextField only send action on <Return>
  • From: Jens Bauer <email@hidden>
  • Date: Fri, 5 Sep 2003 18:50:48 +0200

Hi all,

I have a NSTextField in my interface, and would like it to send an action, but only if the Return key is pressed.
If the Tab key is pressed or if another text-field is clicked, no action should be sent.
How do I do this properly ?

I've had a look at sendActionOn: but I didn't find a working solution here.

Is it possible to find out from the target object 'why' the action method was called ?

-Or do I have to subclass NSTextField to split the Return and vier-change into 2 separate actions?


Love,
Jens
_______________________________________________
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:
    • Second Java process starts up for certain operations, but not with Java Bridge?
      • From: Marc Liyanage <email@hidden>
    • Re: Make NSTextField only send action on <Return>
      • From: Henry McGilton <email@hidden>
  • Prev by Date: Re: Delegate Question
  • Next by Date: Re: Will this leak memory?
  • Previous by thread: Re: Delegate Question
  • Next by thread: Re: Make NSTextField only send action on <Return>
  • Index(es):
    • Date
    • Thread