NSUnarchiver question

2005-09-06 Thread Lloyd Dupont

I'm trying to port a MacOSX application to Windows.
So far it has worked mostly well.
However I'm trying to read one of our data file.

Which is an old format plist with some NSColor wich was stored as an NSData 
(on MacOSX) with

[NSArchiver archivedDataWithRootObject: myColor];

Now I tryed to read it on Windows/GNUstep with
myColor = (NSColor *) [NSUnarchiver unarchiveObjectWithData: aNSData];

and this fails and pops up a little GNUstep exception message box saying:
Critical
NSInternalInconsistencyException: Archive has wrong prefix

Now I wonder:
1. is it that GNUstep's NSUnarchiver deosn't support MacOSX NSArchiver 
format?

2. is it my dictionary/NSData reading which was wrong?
Because I read the XML plist with .NET's XML API and pass the resulting 
NSDictionary to the failing function.
I converted the data string in XML to NSData through something akin to 
uudecode.


Any comments? 




___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: NSUnarchiver question

2005-09-06 Thread Richard Frith-Macdonald

On 2005-09-07 04:13:57 +0100 Lloyd Dupont [EMAIL PROTECTED] wrote:


I'm trying to port a MacOSX application to Windows.
So far it has worked mostly well.
However I'm trying to read one of our data file.

Which is an old format plist with some NSColor wich was stored as an NSData 
(on MacOSX) with

[NSArchiver archivedDataWithRootObject: myColor];

Now I tryed to read it on Windows/GNUstep with
myColor = (NSColor *) [NSUnarchiver unarchiveObjectWithData: aNSData];

and this fails and pops up a little GNUstep exception message box saying:
Critical
NSInternalInconsistencyException: Archive has wrong prefix

Now I wonder:
1. is it that GNUstep's NSUnarchiver deosn't support MacOSX NSArchiver 
format?


Yes ... it's an undocumented proprietory binary format.

We aim to have binary compatility for keyed archives though (reverse 
engineering that was more practicable).




___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: NSUnarchiver question

2005-09-06 Thread Lloyd Dupont

Now I wonder:
1. is it that GNUstep's NSUnarchiver deosn't support MacOSX NSArchiver 
format?


Yes ... it's an undocumented proprietory binary format.

We aim to have binary compatility for keyed archives though (reverse 
engineering that was more practicable).



mmhh... :-/
thanks for your answer!

thankfully we've got a new file format.
windows version won't just support the old format, I suppose...


___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep