• 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: Cocoa Bindings + User Defaults Controller Trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Bindings + User Defaults Controller Trouble


  • Subject: Re: Cocoa Bindings + User Defaults Controller Trouble
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 18 May 2005 22:31:04 +0200

Denis,

On 18.5.2005, at 22:19, Denis Defreyne wrote:

I'm not sure what is going on here and how to fix it. My guess is that since ALFavourite is a custom class, NSUserDefaultsController doesn't know how to store that into the plist, which probably means that I need some kind of value transformer to encode the ALFavourite instances.

Exactly. Defaults can store only plist objects (instances of NSString, NSNumber, NSDate, NSData, NSDictionary, and NSArray). To put another object there you need to transform it -- the most generic solution is to archive it into NSData, but there might be a point in using NSString if applicable (namely, easy accessibility through the defaults CLI command).
---
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
References: 
 >Cocoa Bindings + User Defaults Controller Trouble (From: Denis Defreyne <email@hidden>)

  • Prev by Date: SIMPLE way to pass Objects over a network
  • Next by Date: Re: A CoreData Limitation?
  • Previous by thread: Re: Cocoa Bindings + User Defaults Controller Trouble
  • Next by thread: sample code for connecting to server
  • Index(es):
    • Date
    • Thread