Friday, February 27, 2015

Long not working correct!

Hi,

I tried to share Long object between 2 windows, and looks like Long is failing in the 2nd window.

code:

class Obj {

Long someLong;
String someString;

}

now we export a method for taking a object in a opened Window

public static Obj getObj() { ... } public static native void exportStaticMethod() /*-{ $wnd.getObj= $entry(@mypackage.XXX::getObj()); }-*/;


then we open new window

$wnd.open(params)

and in the new window we call

$wnd.opener.getObj()

we receive the object but the Long value inside fails with no exception. It just dosent work.
if we reset the received value it works again:

Obj objWithLong = $wnd.opener.getObj();

objWithLong .someLong = new Long (objWithLong .someLong);


then it works...


I guess some bug in the translation of long, I guess the represented long object in JS has some problems after shared between window...



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment