Tidy encoding

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5618 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-12-23 18:05:25 +00:00
parent d34a83277b
commit afc8cb7775
2 changed files with 9 additions and 6 deletions

View file

@ -61,7 +61,7 @@ static Class cellClass;
- (id) initWithFrame: (NSRect)frameRect
{
NSSliderCell* theCell = [[[isa cellClass] new] autorelease];
NSSliderCell *theCell = AUTORELEASE([[isa cellClass] new]);
[super initWithFrame: frameRect];
@ -297,7 +297,6 @@ static Class cellClass;
}
[self trackKnob: theEvent knobRect: rect];
}
@end

View file

@ -216,16 +216,20 @@
- (id) initWithCoder: (NSCoder*)decoder
{
self = [super initWithCoder: decoder];
[decoder decodeValuesOfObjCTypes: "ffff",
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue];
[decoder decodeValuesOfObjCTypes: "ffffi",
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue, &_isVertical];
[decoder decodeValueOfObjCType: @encode(id) at: &_titleCell];
_knobCell = [NSCell new];
return self;
}
- (void) encodeWithCoder: (NSCoder*)coder
{
[super encodeWithCoder: coder];
[coder encodeValuesOfObjCTypes: "ffff",
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue];
[coder encodeValuesOfObjCTypes: "ffffi",
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue, &_isVertical];
[coder encodeValueOfObjCType: @encode(id) at: &_titleCell];
}
@end