Re: Save table sort order to User Defaults
Re: Save table sort order to User Defaults
- Subject: Re: Save table sort order to User Defaults
- From: John Timmer <email@hidden>
- Date: Tue, 24 May 2005 12:42:45 -0400
>> Is there an easy way to save the sort order of a table to the user
>> defaults?
>> Binding the ArrayController's sortDescriptors key to a key in the
>> user defaults controller does not seem to work. When sorting the
>> table, I get the following message:
>> *** -[NSUserDefaults setObject:forKey:]: Attempt to insert non-
>> property value '((year, ascending, compare:))' of class 'NSCFArray'.
>>
>> Of course I could save the sortDescriptors array manually but I was
>> wondering if there's an elegant bindings solution to this problem.
>
> Never tried myself, there can be a catch there (!), but might perhaps
> the standard NSUnarchiveFromData value converter help? Generally it
> does in such situations :)
Having tried exactly this, I can confirm that this works nicely in the app
I'm currently working on.
JT
_______________________________________________
This mind intentionally left blank
_______________________________________________
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