MN schrieb:
> i know where it comes from, but i dont like the result of different
> values.

Then don't use toString. The behavior of toString is not always defined
and especially with java.lang.Double I remember having had differences
between different versions of the Java Virtual Machine (violating the
description of toString in the Javadoc, but that is a different
story...).

> i think it is a problem, if your development environment shows
> different values than in production. so you can not test or debug some
> situations etc.

No, be happy that you found a bug (the use of toString where you
really want a specific formatting of a number) during development
and not later when a new version of a browser is shipped that
behaves different as well.

> i can use NumberFormat, but this is a workaround.

Depends on what you want to achieve. If you want to create a
formatted string out of a number, there is no better way
than NumberFormat (except doing it on the server-side to
use I18N of Java).

> and i think only for
> testing to blow up the production code is also not a good solution.
> better way is to make the GWTShell act the same like later the
> production.

If there should be a change then there should be a change of the
GWT-compiler when compiling Double.toString() to Javascript
to act like it's described in e.g.
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html#toString(double)

So in the future the result of Double.toString(600702589)
should be expected to be 6.00702589E8 and you are still left
with the use of NumberFormat to get it the way you want to see it.


Regards, Lothar

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to