• 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: 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


References: 
 >Cocoa Bindings + User Defaults Controller Trouble (From: Denis Defreyne <email@hidden>)

  • Prev by Date: Objective-C & dynamism (was Re: A CoreData Limitation?)
  • Next by Date: SIMPLE way to pass Objects over a network
  • Previous by thread: Cocoa Bindings + User Defaults Controller Trouble
  • Next by thread: Re: Cocoa Bindings + User Defaults Controller Trouble
  • Index(es):
    • Date
    • Thread