Re: Bindings NSArrayController/NSUserDefaultsController nightmare
Re: Bindings NSArrayController/NSUserDefaultsController nightmare
- Subject: Re: Bindings NSArrayController/NSUserDefaultsController nightmare
- From: Bruce Truax <email@hidden>
- Date: Thu, 29 Jul 2004 20:14:19 -0400
Chris makes a good suggestion. At the present time it is not possible to
bind a user interface element to both a data element in your model and a key
in NSUserDefaults. Another option would be bind the value to NSUserDefaults
and then use NSUserDefaults as the container for your data. You would then
access your data value using object: forKey: This works well for single
values but I think it gets more complicated for arrays. I have run into
this same restriction. I recommend that you file an enhancement request
using the bugreporting system.
Bruce
>
On Jul 29, 2004, at 6:11 AM, Drew McCormack wrote:
>
> I would like to archive the contents of the array controller in the
>
> shared NSUserDefaults. So I have bound the contents of the array
>
> controller to a key of NSUserDefaultsController.
>
>
In this case, I'd probably have a model object that has an array that
>
my array controller is bound to, rather than trying to bind it to a key
>
in the user defaults. Then I'd save it to and load it from the user
>
defaults separately.
>
>
-- Chris
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.