> On Aug 20, 2014, at 11:53 AM, Carl Hoefs <newsli...@autonomy.caltech.edu> > wrote: > > >> On Aug 20, 2014, at 11:18 AM, Kyle Sluder <k...@ksluder.com> wrote: >> >>> On Wed, Aug 20, 2014, at 01:13 PM, Carl Hoefs wrote: >>> 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. >> >> NSTextField is not (documented to be) KVO-compliant. Don't try observing >> it. >> >> Instead, turn on the isContinuous property of your text fields (the >> "Continuous" checkbox under the State group on the Properties >> inspector). That'll send the text field's action on each key press. > > For the textfield ‘state’ I do have Continuous checked, but I don’t get an > action sent. Does that setting somehow override the ‘Action’ setting (Sent On > End Editing)?
Well, I certainly *thought* it did… You might need to sign up as the text fields’ delegate and implement -controlTextDidChange:. (Or listen for NSControlTextDidChangeNotification.) --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com