mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 19:26:32 +00:00
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:
parent
91430f347e
commit
13a4046e1a
6 changed files with 132 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue