Menu

#16 GPoint getters return Strings

open
nobody
None
5
2007-06-28
2007-06-28
No

It seems that GPoint.setX() and GPoint.setY() convert their arguments to a String, but getX() and getY() fails to convert them back to an int.

The following snippet, for example, displays "22":

GPoint point = new GPoint(0, 0);
point.setX(2);
int x = point.getX() + 2;
Window.alert("" + x);

Discussion


Log in to post a comment.