Re: How to control the commit of text edit field with binding?
Re: How to control the commit of text edit field with binding?
- Subject: Re: How to control the commit of text edit field with binding?
- From: James Bucanek <email@hidden>
- Date: Fri, 5 May 2006 12:54:57 -0700
Mike Abdullah wrote on Friday, May 5, 2006:
>So you have a text field bound to the shared defaults controller. At
>the moment, whatever you type in the field instantly gets saved to
>the defaults, but you don't want this to happen. Instead you want
>the new value to only be saved when the user hits the OK button?
>
>If I have understood you correctly then, the answer is fairly simple.
>
>1. Untick the "continuously updates value" option for the binding
>2. Call commitEditing upon the defaults controller whenever you want
>to save the value
I tried that, but it doesn't work. With the "continuously updates value" off the field will not repeatedly update the model's value. But the field does commits its value whenever you tab to another field or close the window; essentially whenever the text field's editor resigns the value is pushed back to the model.
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden