diff --git a/ChangeLog b/ChangeLog index feb475825..249b2aacf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-07-11 Gregory John Casamento + + * Source/GSNibTemplates.m: Added code to allow the switching + of which version of the file gets encoded based on the value + of the class variable "version". This is part of an experimental + feature in .gorm files to allow Gorm.app to encode older versions + of .gorm files for previous versions of GNUstep. + 2004-07-11 Chad Hardin * Headers/AppKit/NSPageLayout.h: diff --git a/Source/GSNibTemplates.m b/Source/GSNibTemplates.m index 1ed397129..1a00d2f82 100644 --- a/Source/GSNibTemplates.m +++ b/Source/GSNibTemplates.m @@ -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