Re: Unarchive consistency errors
Re: Unarchive consistency errors
- Subject: Re: Unarchive consistency errors
- From: Prachi Gauriar <email@hidden>
- Date: Sun, 25 Apr 2004 12:24:21 -0500
On Apr 25, 2004, at 9:27 AM, Sam Thorne wrote:
Hello,
I can't work out what the inconsistency might be in unarchiving.
My object inherits from NSObject so doesn't need to call [super
initWithCoder:], the objects are encoded and decoded in the same
order, why is this raising an inconsistency in unarchiving exception?
<snip>
[coder encodeObject:codeView]; // NSMutableArray
This line looks a little suspicious... It's just odd that an array
would have a name ending in view, that's all.
Have you tried using the debugger? Just set it to break on
[NSException raise] (in the Breakpoints window of the Debugger). Try
encoding/decoding and see where the inconsistency occurs.
Also, have you looked into using keyed archives? They're really
similar to what you have, but you encode each object with a key, and
the order of encoding/decoding isn't important. From Apple, "Keyed
archives are the preferred archive type in Mac OS X version 10.2 and
later."
<
http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/
index.html?
http://developer.apple.com/documentation/Cocoa/Conceptual/
Archiving/Concepts/archives.html>
-Prachi
_______________________________________________
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.