• 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: Issuing NSTextField action message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issuing NSTextField action message


  • Subject: Re: Issuing NSTextField action message
  • From: Graham Cox <email@hidden>
  • Date: Wed, 20 Aug 2014 12:08:04 +1000

On 20 Aug 2014, at 11:33 am, Carl Hoefs <email@hidden> wrote:

> OS X 10.9.4  I have an NSTextField into which a user types digits. When a digit is typed, I have it set up so the -controlTextDidChange: delegate method is invoked. Now, in the delegate method I would like (depending on circumstances) to cause the text field to behave like the user ended editing to send its action message. Is this possible? The text field action is set to “Sent on End Editing” in Xcode. I’ve noticed that at runtime that [tField action] is null.


Yes, it's possible. But note that during editing, you're actually use the Field Editor, not the control itself. So you need to get the action from the actual control, not the field editor. You might need to do work to track which field is being editied, if you can't infer it from properties of the field editor.

--Graham



_______________________________________________

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


References: 
 >Issuing NSTextField action message (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Issuing NSTextField action message
  • Next by Date: AutoLayout textfield against accessory view
  • Previous by thread: Issuing NSTextField action message
  • Next by thread: Re: Issuing NSTextField action message
  • Index(es):
    • Date
    • Thread