Re: observeValueForKeyPath:... called too often in macOS 12
Re: observeValueForKeyPath:... called too often in macOS 12
- Subject: Re: observeValueForKeyPath:... called too often in macOS 12
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Wed, 19 Oct 2016 14:49:46 +0700
> On 19 Oct 2016, at 13:01, Quincey Morris <email@hidden> 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 (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