A bug related to rounding integers?
This looks like a bug to me:
public static native void setWText(int x) /*-{
var width = $doc.getElementById("width");
x = Math.round(x);
width.value = x;
}-*/;
With the call to Math.round the width element is set to an integer
value; but without that call it is set to a non-integer numeric value.
There are two problems here - that it is not an integer in Javascript,
and that the value is off, in about the 4th decimal place in my
example, with a fractional parts of .94... and .69... in two tests, on
an integer of around 300 - definitely not close enough.
Am I missing something?
The environment is GWT 2.4, Linux, deployed to Tomcat 7, client Chrome
15.0.874.121.
Thanks for any help!
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home