Added some more keyed decoding.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20211 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-10-08 21:24:25 +00:00
parent 00a434e4a0
commit 67b2f51063
5 changed files with 217 additions and 73 deletions

View file

@ -368,12 +368,24 @@ static NSColor *shadowCol;
BOOL tmp;
[super initWithCoder: aDecoder];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
_formcell_auto_title_width = tmp;
[aDecoder decodeValueOfObjCType: @encode(float) at: &_displayedTitleWidth];
[aDecoder decodeValueOfObjCType: @encode(id)
at: &_titleCell];
if ([aDecoder allowsKeyedCoding])
{
if ([aDecoder containsValueForKey: @"NSTitleWidth"])
{
[self setTitleWidth: [aDecoder decodeFloatForKey: @"NSTitleWidth"]];
}
if ([aDecoder containsValueForKey: @"NSTitleCell"])
{
ASSIGN(_titleCell, [aDecoder decodeObjectForKey: @"NSTitleCell"]);
}
}
else
{
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
_formcell_auto_title_width = tmp;
[aDecoder decodeValueOfObjCType: @encode(float) at: &_displayedTitleWidth];
[aDecoder decodeValueOfObjCType: @encode(id) at: &_titleCell];
}
return self;
}