Re: Cocoa Bindings + User Defaults Controller Trouble
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