Re: Using NSTextField value without changing focus?
Re: Using NSTextField value without changing focus?
- Subject: Re: Using NSTextField value without changing focus?
- From: Keary Suska <email@hidden>
- Date: Tue, 11 Sep 2012 09:26:51 -0600
On Sep 11, 2012, at 7:17 AM, Koen van der Drift wrote:
> And as a followup, I am using bindings to link the value of the
> textfield to my controller to do the calculations. I als tried
> checking "Continuously Updates Value" in IB, but that also didn't
> work, I still need to unfocus the textfield for the new value to be
> used.
"Continuously Updates Value" is what you want, usually. I bet that if you put NSLogs in the setters you will find that they are being set immediately. If this isn't working, it means that your calculation method is not working on the same model as the bindings, or at least not an up-to-date copy, which is generally a bad idea. The calculation method should retrieve the values directly from the model owner on demand, which will do what you need.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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