• 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: Distinguishing between return and enter in NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distinguishing between return and enter in NSTextField


  • Subject: Re: Distinguishing between return and enter in NSTextField
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 03 Sep 2009 11:14:20 -0700

Short answer: no. Stay away from keyDown: and look at delegate methods instead. I have a standard rant on this topic; I don't have it handy but it should be in the list archives.

Douglas Davidson



On Sep 3, 2009, at 10:54 AM, Rick Mann <email@hidden> wrote:

Hi. I'd like to insert a new line when the user presses return in an NSTextField, but take completely custom action when they press Enter. Is the only way to do this to subclass NSTextField and override the NSResponder keyDown: method?

TIA,
Rick

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Distinguishing between return and enter in NSTextField
      • From: Rick Mann <email@hidden>
References: 
 >Distinguishing between return and enter in NSTextField (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Getting a StringPtr from Gestalt on 64-bit
  • Next by Date: Re: Distinguishing between return and enter in NSTextField
  • Previous by thread: Distinguishing between return and enter in NSTextField
  • Next by thread: Re: Distinguishing between return and enter in NSTextField
  • Index(es):
    • Date
    • Thread