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

@ -337,4 +337,21 @@ static NSNotificationCenter *nc = nil;
[self fixAttributesInRange: range];
}
- (id) initWithCoder: (NSCoder*)aDecoder
{
if ([aDecoder allowsKeyedCoding])
{
id delegate = [aDecoder decodeObjectForKey: @"NSDelegate"];
NSString *string = [aDecoder decodeObjectForKey: @"NSString"];
self = [self initWithString: string];
[self setDelegate: delegate];
}
else
{
self = [super initWithCoder: aDecoder];
}
return self;
}
@end