More keyed decoding.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18603 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-02-15 18:23:13 +00:00
parent fb0c973e48
commit 0fba15f09b
6 changed files with 132 additions and 10 deletions

View file

@ -429,5 +429,33 @@ framework intact.
return NSPointInRect(aPoint, _containerRect);
}
- (id) initWithCoder: (NSCoder*)aDecoder
{
if ([aDecoder allowsKeyedCoding])
{
//NSLayoutManager *manager = [aDecoder decodeObjectForKey: @"NSLayoutManager"];
NSTextView *view = [aDecoder decodeObjectForKey: @"NSTextView"];
NSSize size = NSZeroSize;
if ([aDecoder containsValueForKey: @"NSWidth"])
{
size.width = [aDecoder decodeFloatForKey: @"NSWidth"];
}
self = [self initWithContainerSize: size];
if ([aDecoder containsValueForKey: @"NSTCFlags"])
{
// FIXME
//int flags = [aDecoder decodeIntForKey: @"NSTCFlags"];
}
// No need to set manager as the decoding of the layout manager does it
[self setTextView: view];
return self;
}
else
{
return self;
}
}
@end /* NSTextContainer */