Change to GSNibContainer to allow encoding of older container version.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19718 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-07-12 03:27:36 +00:00
parent 28406602d1
commit 7f1e3425e5
2 changed files with 21 additions and 3 deletions

View file

@ -333,9 +333,19 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeObject: nameTable];
[aCoder encodeObject: connections];
[aCoder encodeObject: topLevelObjects];
int version = [GSNibContainer version];
if(version == GNUSTEP_NIB_VERSION)
{
[aCoder encodeObject: nameTable];
[aCoder encodeObject: connections];
[aCoder encodeObject: topLevelObjects];
}
else
{
// encode it as a version 0 file...
[aCoder encodeObject: nameTable];
[aCoder encodeObject: connections];
}
}
- (id) init