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:
Fred Kiefer 2004-02-15 18:23:13 +00:00
parent 91430f347e
commit 13a4046e1a
6 changed files with 132 additions and 10 deletions

View file

@ -2139,5 +2139,37 @@ no_soft_invalidation:
}
- (id) initWithCoder: (NSCoder*)aDecoder
{
self = [self init];
if ([aDecoder allowsKeyedCoding])
{
int i;
id delegate = [aDecoder decodeObjectForKey: @"NSDelegate"];
int flags;
NSArray *array = [aDecoder decodeObjectForKey: @"NSTextContainers"];
NSTextStorage *storage = [aDecoder decodeObjectForKey: @"NSTextStorage"];
if ([aDecoder containsValueForKey: @"NSLMFlags"])
{
flags = [aDecoder decodeIntForKey: @"NSLMFlags"];
// FIXME
}
[self setDelegate: delegate];
[storage addLayoutManager: self];
for (i = 0; i < [array count]; i++)
{
[self addTextContainer: [array objectAtIndex: i]];
}
return self;
}
else
{
return self;
}
}
@end