Fix so that rects are correctly encoded on macosx

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6168 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2000-03-04 18:30:11 +00:00
parent a123efb34e
commit a1a9c2ac03

View file

@ -534,8 +534,10 @@
- (void) encodePoint: (NSPoint)point withName: (NSString*)name
{
if (!findingConditionals && name) {
id valueString = NSStringFromPoint (point);
/* Macosx NSStringFromPoint is not OPENstep compliant, so we do it by hand. */
id valueString = [NSString stringWithFormat: @"{x=%f; y=%f}",
point.x, point.y];
[lastObjectRepresentation setObject: valueString forKey: name];
}
}
@ -543,7 +545,9 @@
- (void) encodeSize: (NSSize)size withName: (NSString*)name
{
if (!findingConditionals) {
id valueString = NSStringFromSize (size);
/* Macosx NSStringFromSize is not OPENstep compliant, so we do it by hand. */
id valueString = [NSString stringWithFormat: @"{width=%f; height=%f}",
size.width, size.height];
[lastObjectRepresentation setObject: valueString forKey: name];
}
@ -552,8 +556,11 @@
- (void) encodeRect: (NSRect)rect withName: (NSString*)name
{
if (!findingConditionals) {
id valueString = NSStringFromRect (rect);
/* Macosx NSStringFromRect is not OPENstep compliant, so we do it by hand. */
id valueString = [NSString stringWithFormat:
@"{x=%f; y=%f; width=%f; height=%f}",
rect.origin.x, rect.origin.y,
rect.size.width, rect.size.height];
[lastObjectRepresentation setObject: valueString forKey: name];
}
}