"Clark S. Cox III" wrote:
> 
>    I'm writing a role-playing-game (on MacOSX), and I am using
> NSArchiver to save my game objects to disk. I was wondering if the
> GNUStep implimentation of NSArchiver/NSUnarchiver use the same file
> format. I need to know this because I am considering porting it to
> GNUStep as well.
>    i.e. If I were to save a bunch of classes to disk with NSArchiver on
> MacOSX, would the implementation of NSUnarchiver under GNUStep be able
> to read that file (and vice-versa)?
> 

Sorry if this didn't get answered sooner. newsgroups don't seem to get
mirrored to the mailing lists (which is what most people read).

The Archiver formats aren't compatible. They are binary formats, and in
fact, wouldn't be compatible between different machines in any case (if
MacOSX ran on different machines) due to endiness and type size
differences.

There are a few options you have:

  Store the data as a property list (if all you use are Dictionaries,
Arrays and Strings)

  Define your own format (and perhaps implement your own archiver
classes to store them).

  Apple is transitioning to XML format. I don't know if there is any
information on using it yet. Plus GNUstep doesn't implement it yet (but
will).

Reply via email to