how to save NSDictionary in NSUserDefaults
hello
i am able to save simple user preferences
like strings, values or bools
but now that i am trying to save more complex user data stored in NSDisctionary
i get error saying i am trying to store non property values:
[[NSUserDefaults standardUserDefaults] setObject:myDictionary forKey:@"savedData"];
i confirmed in the docs that it is possible to save NSArray and NADictionary
i though my issue was because i am trying to save a dictionary of custom classes
but i tried with a simple dictionary with just NSStrings there and it ithrew the same error
i also tried to use the NSArchiver technique described to save NSColor but i also got the same error
pls help !
my users are not able to retrieve saved prefs...
i am able to save simple user preferences
like strings, values or bools
but now that i am trying to save more complex user data stored in NSDisctionary
i get error saying i am trying to store non property values:
[[NSUserDefaults standardUserDefaults] setObject:myDictionary forKey:@"savedData"];
i confirmed in the docs that it is possible to save NSArray and NADictionary
i though my issue was because i am trying to save a dictionary of custom classes
but i tried with a simple dictionary with just NSStrings there and it ithrew the same error
i also tried to use the NSArchiver technique described to save NSColor but i also got the same error
pls help !
my users are not able to retrieve saved prefs...
MBP c2d 2.16 / iMac g5 2.1, Mac OS X (10.5.4)