is this as expected (Random can't be used in a static method) ?????
public static void test() { // static method
Log.info("random int "+Random.nextInt(6));
}
----->throws a java.lang.UnsatisfiedLinkError:
com.google.gwt.user.client.Random.nextInt(I)I
BUT ...
com.google.gwt.user.client.Random;
public void test() { // non-static method
Log.info("random int: "+Random.nextInt(6));
----->IS OK!!!
--------- a l s o ----------
java.util.Random random = new Random;
public static void test() { // static method
Log.info("random int "+random.nextInt(6));
}
----->throws a nullpointer
BUT ...
public void test() { // not static
Log.info("random int "+random.nextInt(6));
}
----->is fine!!!
Aaaaaaah. Damn, I just re-factored for hours and made a static
reusable utility class...
Why can't I do that by the way?
Shawn
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
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.