NSUserDefaults and objects
NSUserDefaults and objects
- Subject: NSUserDefaults and objects
- From: "Alan Smith" <email@hidden>
- Date: Sun, 12 Mar 2006 13:50:39 -0500
I want to store an array of objects in the user defaults for retrieval when
the program launches next time. The objects have two attributes, two
strings. One is the name of an app and the other the path of that app. It
also has a couple of methods with it. But when I try setObject: forKey:, or
whatever it is, it complains about the objects in the array. So is there a
way to encode, or something, these objects so they'll go in and come back
out as my object type?
And one more thing. The dock has a file in
Dock/Contents/Resources/English.lproj/defaults.plist. I uses this the first
times it's launched and adds apps to the dock according to the arrays in
that plist file. I want my app to have the same thing. A previously saved
pref file and store it in the apps bundle so that when it gets run on
someone elses computer it has a pref file to load, with apps in it.
Cheers, Alan
_______________________________________________
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