> On 19 Oct 2016, at 15:08, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> On Oct 19, 2016, at 00:49 , Gerriet M. Denkmann <g...@mdenkmann.de> wrote:
>> 
>> Before:
>> 
>> TextField1 bound Value to:
>>      Shared User Defaults Controller
>>      Controller Key = values
>>      Model Key Path = TextField1
>> 
>> This worked fine.
> 
> Yeah, I didn’t realize you were binding to a NSUserDefaultsController. Since 
> that implements NSEditorRegistration and NSEditor, switching to 
> NSObjectController doesn’t improve anything.
> 
> The real problem is that it just doesn’t know when you app is about to quit. 
> If you want to save text fields that are still being edited, make sure you 
> invoke one of the NSEditor methods on the NSUserDefaultsController before you 
> quit, e.g. “commitEditing”. That will force it to end editing.

I added:
        applicationWillTerminate:
                [ NSUserDefaultsController.sharedUserDefaultsController 
commitEditing ] 
which seems to fix this issue (which was clearly a bug in my own code).

Thanks for your help!


Kind regards,

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