• 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: What is the best way to get events fired on keypress for an NSTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to get events fired on keypress for an NSTextField?


  • Subject: Re: What is the best way to get events fired on keypress for an NSTextField?
  • From: Steve Mills <email@hidden>
  • Date: Thu, 12 Mar 2015 11:46:55 -0500

On Mar 12, 2015, at 11:04:55, Patrick J. Collins <email@hidden> wrote:
>
> I hooked up an action from IB to my view controller, but I don't see an
> option for where to define what kind of action it is...  So my problem
> is events are only being fired when a textfield stops being edited.  I
> would like it to fire anytime a key is pressed,  What is the best way to
> do this currently?

I'm not aware of a way to do that. Have you tried subclassing NSTextfield and overriding keyDown, and calling the action handler from there?

--
Steve Mills
Drummer, Mac geek


_______________________________________________

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: What is the best way to get events fired on keypress for an NSTextField?
      • From: Mike Abdullah <email@hidden>
References: 
 >What is the best way to get events fired on keypress for an NSTextField? (From: "Patrick J. Collins" <email@hidden>)

  • Prev by Date: What is the best way to get events fired on keypress for an NSTextField?
  • Next by Date: Re: NSSharedWorkspace Notification Question
  • Previous by thread: What is the best way to get events fired on keypress for an NSTextField?
  • Next by thread: Re: What is the best way to get events fired on keypress for an NSTextField?
  • Index(es):
    • Date
    • Thread