diff --git a/ChangeLog b/ChangeLog index c0d1cd797..c090092ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-13 Fred Kiefer + + * Source/GSTextStorage.m (-initWithCoder:): Display the warning + only when we load an old .gorm file. + 2009-10-12 Fred Kiefer * Source/NSScroller.m (-mouseDown:): In NSWindows95InterfaceStyle diff --git a/Source/GSTextStorage.m b/Source/GSTextStorage.m index d04a7702a..70b7e0762 100644 --- a/Source/GSTextStorage.m +++ b/Source/GSTextStorage.m @@ -465,12 +465,15 @@ _attributesAtIndexEffectiveRange( - (id) initWithCoder: (NSCoder*)aCoder { - NSLog(@"Warning - decoding archive containing obsolete %@ object - please delete/replace this archive", NSStringFromClass([self class])); self = [super initWithCoder: aCoder]; if([aCoder allowsKeyedCoding] == NO) { - [aCoder decodeValueOfObjCType: @encode(id) at: &_textChars]; - [aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray]; + if ([aCoder versionForClassName: @"GSTextStorage"] != (NSInteger)NSNotFound) + { + NSLog(@"Warning - decoding archive containing obsolete %@ object - please delete/replace this archive", NSStringFromClass([self class])); + [aCoder decodeValueOfObjCType: @encode(id) at: &_textChars]; + [aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray]; + } } return self; }