discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compatibility between NSKeyedArchiver in GNUstep and OS X


From: Richard Frith-Macdonald
Subject: Re: compatibility between NSKeyedArchiver in GNUstep and OS X
Date: Wed, 16 Feb 2005 05:28:00 +0000


On 16 Feb 2005, at 03:16, Gregory John Casamento wrote:

Dan,

--- Dan Hitt <hitt@eskimo.com> wrote:

Both OS X and GNUstep implement NSKeyedArchiver, which for reference
allows a graph of objects to be archived.

Are the implementations compatibile?

That is, if i use NSKeyedArchiver to  archive some data to a file,
will the same NSKeyedUnarchiver code i use to read it work for
both OS X  and GNUstep?

Full compatibility has not yet been achieved for gui elements. I believe, however, that most of the elements in Foundation/base archive in a way which is
compatible with Mac OS X.

Richard, can you confirm this??

Yes and no :-)

The archive format itsself is MacOS-X compatible, and it is based on property lists, so all the classes used in property lists are pretty well tested (NSString, NSArray, NSDictionary, NSNumber, NSDate, NSData).

In general, keyed archiving methods for other classes have *not* been implemented and those other classes would probably not be written to archives in a form which would work on MacOSX.

However, it's unusual to want to archive the other foundation classes when writing the archiving methods of your own classes (and always possible to avoid using them).

So, while keyed archiving implementations of other base classes are not essential, it would be nice if people who wanted them could reverse engineer the MacOSX and
contribute MacOSX compatible code.
We do not accept keyed archiving implementations unless they are MacOSX compatible ... so any class which has encodeWithCoder: and initWithCoder: methods containing
keyed archiving code should be usable in a portable archive.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]