diff --git a/ChangeLog b/ChangeLog index 52b39b0e6..e40f63ce0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-11-18 Gregory John Casamento + + * Source/NSBundleAdditions.m: Added some logic in the initWithCoder + method to handle different gorm file versions. Even though there + is only one version currently, we need this in place. + * Headers/gnustep/gui/GSNibTemplates.h: Added #define for + GNUSTEP_NIB_VERSION. + 2002-11-17 Fred Kiefer * Source/NSCell.m @@ -11,6 +19,7 @@ Rewrote [drawHashMarksAndLabelsInRect:] to use string drawing and bezier path code instead of direct PS operations. +>>>>>>> 1.1674 2002-11-15 Adam Fedor * Model/GMAppKit.m ([NSColor -encodeWithModelArchiver:]): Encode diff --git a/Headers/gnustep/gui/GSNibTemplates.h b/Headers/gnustep/gui/GSNibTemplates.h index bff1ecbd9..ec74eec0a 100644 --- a/Headers/gnustep/gui/GSNibTemplates.h +++ b/Headers/gnustep/gui/GSNibTemplates.h @@ -35,6 +35,8 @@ #include #include +#define GNUSTEP_NIB_VERSION 0 + @class NSString; @class NSDictionary; @class NSMutableDictionary; diff --git a/Source/NSBundleAdditions.m b/Source/NSBundleAdditions.m index a6c4a0ea6..30df93e0a 100644 --- a/Source/NSBundleAdditions.m +++ b/Source/NSBundleAdditions.m @@ -467,6 +467,14 @@ Class gmodel_class(void) */ @implementation GSNibContainer ++ (void) initialize +{ + if (self == [GSNibContainer class]) + { + [self setVersion: GNUSTEP_NIB_VERSION]; + } +} + - (void) awakeWithContext: (NSDictionary*)context { if (_isAwake == NO) @@ -592,8 +600,14 @@ Class gmodel_class(void) - (id) initWithCoder: (NSCoder*)aCoder { - [aCoder decodeValueOfObjCType: @encode(id) at: &nameTable]; - [aCoder decodeValueOfObjCType: @encode(id) at: &connections]; + int version = [aCoder versionForClassName: @"GSNibContainer"]; + + if(version == GNUSTEP_NIB_VERSION) + { + [aCoder decodeValueOfObjCType: @encode(id) at: &nameTable]; + [aCoder decodeValueOfObjCType: @encode(id) at: &connections]; + } + return self; } @@ -816,6 +830,7 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); } - (NSString *)className @@ -918,6 +933,7 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); } - (NSString *)className @@ -1018,6 +1034,7 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); } - (NSString *)className @@ -1122,6 +1139,7 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); } - (NSString *)className @@ -1201,6 +1219,8 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); + } - (NSString *)className @@ -1324,6 +1344,7 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); } - (NSString *)className @@ -1444,6 +1465,7 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); } - (NSString *)className @@ -1499,6 +1521,7 @@ Class gmodel_class(void) - (void) setClassName: (NSString *)name { ASSIGN(_className, name); + RETAIN(_className); } - (id) template