mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 23:50:47 +00:00
Added keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18510 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7ba988efd5
commit
5f72e933d1
14 changed files with 816 additions and 458 deletions
|
@ -302,16 +302,35 @@ static NSImage *images[maxCount];
|
|||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
self = [super initWithCoder:aDecoder];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_isIndeterminate];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_isBezeled];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_usesThreadedAnimation];
|
||||
[aDecoder decodeValueOfObjCType: @encode(NSTimeInterval)
|
||||
at:&_animationDelay];
|
||||
[aDecoder decodeValueOfObjCType: @encode(double) at:&_doubleValue];
|
||||
[aDecoder decodeValueOfObjCType: @encode(double) at:&_minValue];
|
||||
[aDecoder decodeValueOfObjCType: @encode(double) at:&_maxValue];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_isVertical];
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
//id *matrix = [aDecoder decodeObjectForKey: @"NSDrawMatrix"];
|
||||
|
||||
if ([aDecoder containsValueForKey: @"NSMaxValue"])
|
||||
{
|
||||
int max = [aDecoder decodeIntForKey: @"NSMaxValue"];
|
||||
|
||||
[self setMaxValue: max];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSpiFlags"])
|
||||
{
|
||||
//int flags = [aDecoder decodeIntForKey: @"NSpiFlags"];
|
||||
// FIXME
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_isIndeterminate];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_isBezeled];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_usesThreadedAnimation];
|
||||
[aDecoder decodeValueOfObjCType: @encode(NSTimeInterval)
|
||||
at:&_animationDelay];
|
||||
[aDecoder decodeValueOfObjCType: @encode(double) at:&_doubleValue];
|
||||
[aDecoder decodeValueOfObjCType: @encode(double) at:&_minValue];
|
||||
[aDecoder decodeValueOfObjCType: @encode(double) at:&_maxValue];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&_isVertical];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue