Correction for GSNibCompatibility. Added coding to classes for keyed archiving.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23225 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2006-08-09 01:37:32 +00:00
parent dc4a427c47
commit 84d0296b74
11 changed files with 227 additions and 91 deletions

View file

@ -167,16 +167,21 @@
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder: aCoder];
[aCoder encodeObject: _window];
[aCoder encodeRect: _rect];
if([aCoder allowsKeyedCoding] == NO)
{
[aCoder encodeObject: _window];
[aCoder encodeRect: _rect];
}
}
- (id) initWithCoder: (NSCoder*)aDecoder
{
self = [super initWithCoder: aDecoder];
[aDecoder decodeValueOfObjCType: @encode(id) at: &_window];
_rect = [aDecoder decodeRect];
if([aDecoder allowsKeyedCoding] == NO)
{
[aDecoder decodeValueOfObjCType: @encode(id) at: &_window];
_rect = [aDecoder decodeRect];
}
return self;
}