> On 19 Oct 2016, at 13:01, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> 
> One way around this is to use a NSObjectController bound between the text 
> field and the data model (user defaults in this case). NSObjectController 
> implements the editor protocols, so this covers the case where the window 
> closes while an edit is in progress. However, IIRC it doesn’t help when a 
> document “save” occurs or when the app quits, for separate reasons.

I am struggling to do so (and failing miserably):

Before:

TextField1 bound Value to:
        Shared User Defaults Controller
        Controller Key = values
        Model Key Path = TextField1

This worked fine.

Now added NSObjectController
        Mode = Class
        Class Name = NSMutableDictionary ??
        not prepares Content
        editable

Bind Controller Content to:
        Shared User Defaults Controller
        Controller Key = values
        Model Key Path = standardUserDefaults ??

TextField1 bound Value to:
        Object Controller
        Controller Key = selection
        Model Key Path = TextField1 ??

This crashes with -[_NSControllerObjectProxy copyWithZone:]: unrecognized 
selector sent to instance 0x10….

Obviously I am not knowing what to do and am just groping blindly.

How does one put an NSObjectController between an NSTextField and the Shared 
User Defaults Controller ?

Gerriet.


_______________________________________________

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

Reply via email to