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: Sat, 6 May 2006 16:36:08 -0700
Jordan Krushen wrote on Saturday, May 6, 2006:
>On 5/6/06, James Bucanek <email@hidden> wrote:
>
>>On reflection, there might be a generalized solution possible. If I run into
>>this again, I'm going to consider
>>creating a subclass of NSObjectController and adding a transparent/buffered
>>mode to the object. In transparent mode, everything works like a regular
>>NSObjectController; all notifications of value changes are passed to the
>>appripriate reciever. But in buffered mode, changes to values receives from
>>the view would simply be stored in a dictionary and not passed to the model.
>>When the view is ready, all of the buffered changes could be sent to the
>>model en mass or discarded.
>
>Isn't that exactly what NSUserDefaultsController's
>-setAppliesImmediately:, -hasUnappliedChanges, -revert, -save etc. do?
Yes it is. And if NSUserDefaultsController was NSObjectController everything would be solved.
Someone already posted that NSUserDefaultsController will do this. I was disappointed that this feature was only supported for NSUserDefaults but not for any other kind of NSController, specifically NSObjectController, and therefore not supported for any other kinds bindings. Nor is it inherintly supported by the binding technology in general.
--
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