Re: Issuing NSTextField action message
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