• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Save table sort order to User Defaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save table sort order to User Defaults


  • Subject: Re: Save table sort order to User Defaults
  • From: Peter Schols <email@hidden>
  • Date: Tue, 24 May 2005 18:39:35 +0200

Hi Ondra,

Thanks for your reply.
Unfortunately, that does not help. When I set the NSUnarchiveFromData value converter, I get:


2005-05-24 18:37:32.321 MyApp[16856] *** -[NSCFArray bytes]: selector not recognized [self = 0x33d3ad0]
2005-05-24 18:37:32.352 MyApp[16856] An uncaught exception was raised
2005-05-24 18:37:32.376 MyApp[16856] *** -[NSCFArray bytes]: selector not recognized [self = 0x33d3ad0]
2005-05-24 18:37:32.383 MyApp[16856] *** Uncaught exception: <NSInvalidArgumentException> *** -[NSCFArray bytes]: selector not recognized [self = 0x33d3ad0]


Best,

peter


On 24 May 2005, at 18:26, Ondra Cada wrote:

Peter,

On 24.5.2005, at 18:21, Peter Schols wrote:


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 :)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc





_______________________________________________ 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
  • Follow-Ups:
    • Re: Save table sort order to User Defaults
      • From: John Timmer <email@hidden>
References: 
 >Save table sort order to User Defaults (From: Peter Schols <email@hidden>)
 >Re: Save table sort order to User Defaults (From: Ondra Cada <email@hidden>)

  • Prev by Date: setNeedsDisplay broken in Tiger
  • Next by Date: Re: Save table sort order to User Defaults
  • Previous by thread: Re: Save table sort order to User Defaults
  • Next by thread: Re: Save table sort order to User Defaults
  • Index(es):
    • Date
    • Thread