Re: Cocoa Bindings + User Defaults Controller Trouble
Re: Cocoa Bindings + User Defaults Controller Trouble
- Subject: Re: Cocoa Bindings + User Defaults Controller Trouble
- From: Chris Parker <email@hidden>
- Date: Wed, 18 May 2005 13:25:24 -0700
On May 18, 2005, at 1:19 PM, Denis Defreyne wrote:
[some snippage]
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.
I've tried messing around, to no avail. What am I overlooking?
You'd be having this problem without NSUserDefaultsController in the
mix. You can only put plist types into NSUserDefaults (with or
without NSUDController involved). You should make sure your
ALFavourite class can do keyed archiving and then use that to get an
NSData of your (encoded) instance. Put that NSData into NSUserDefaults.
.chris
--
Chris Parker
Cocoa Frameworks
Apple Computer, Inc.
_______________________________________________
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