Re: Issuing NSTextField action message
Re: Issuing NSTextField action message
- Subject: Re: Issuing NSTextField action message
- From: Carl Hoefs <email@hidden>
- Date: Wed, 20 Aug 2014 11:13:58 -0700
On Aug 19, 2014, at 10:38 PM, Ken Thomases <email@hidden> wrote:
> On Aug 19, 2014, at 8:33 PM, 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.
>
> What exactly do you mean? What behaviors? Do you just mean you want the action message to be sent? Or do you want the text field to change state or something? Do you want it to still have focus and be editing?
I’m working on a financial system that accepts three variable user inputs to a formula. When the user types into any of the three textfields, it must update the other fields as the user types, without an Enter or Return. Think of it like a currency exchange program or temperature conversion, etc. so the user can immediately see the changes based on each stroke of the input (sort of like how Spotlight takes as much as you’ve typed in).
So what I’ve managed to program so far is a KVO setup between three textfields, and when the user enters a number into any one of them — and presses Return — the others textfields update to reflect the new input. I’m trying to do this same thing but without the need for the Return.
-Carl
_______________________________________________
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