Move warning method that was shown too often.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28824 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-10-13 20:54:12 +00:00
parent 862f3e0cf7
commit 875614cc47
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2009-10-13 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSTextStorage.m (-initWithCoder:): Display the warning
only when we load an old .gorm file.
2009-10-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSScroller.m (-mouseDown:): In NSWindows95InterfaceStyle

View file

@ -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;
}