Re: Reading Archived Data From File
Re: Reading Archived Data From File
- Subject: Re: Reading Archived Data From File
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 8 Jun 2004 19:27:16 -0600
On Jun 8, 2004, at 5:02 PM, Frederick C. Lee wrote:
Scenario: My NSMutableDictionary is composed of {CountryName Key/
CountryModel objects}. The CountryModel is a custom class that
contains assorted instance variables including a NSMutableDictionary of
CityModels.
I noticed that you're trying to use NSKeyedArchiver and NSUnarchiver
together:
if (![NSKeyedArchiver archiveRootObject:theCountryMDict
toFile:countryDataSource]) { // Good
[...]
theCountryMDict = [[NSUnarchiver
unarchiveObjectWithFile:countryDataSource] retain]; // Fails to
populate theCountryMDict.
I'd suggest trying that again using NSArchiver (not NSKeyedArchiver) to
handle the archiving. Or, if you need NSKeyedArchiver, then use
NSKeyedUnarchiver to handle the unarchiving.
Nick Zitzmann
<
http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.