I ran into this doozie with the upgrade from gwt 1.5 to gwt 1.6. We've had
problem with writing a custom selection script before, about getting the
protocol version passed correctly to the gwtOnLoad() method.
I addressed the problem a while back by adding a variable substitution in
the template:
(GadgetTemplate.js)
// Kicks off hosted mode
external.gwtOnLoad($wnd, '__MODULE_NAME__',
'__GWT_MAJOR_VERSION__');
GadgetLinker.java:
protected String generateSelectionScript(...) {
...
String gwtVersions[] = About.GWT_VERSION_NUM.split("\\.");
replaceAll(scriptContents, "__GWT_MAJOR_VERSION__", gwtVersions[0] + "."
+ gwtVersions[1]);
return scriptContents.toString();
}
The problem I'm having is that I believe that About.GWT_VERSION_NUM is being
baked into the .class files generated when I compile gwt-gadgets.jar (with
GWT 1.5 as it turns out). I think this needs to turn into a getter instead.
---------- Forwarded message ----------
From: <[email protected]>
Date: Wed, Jun 3, 2009 at 10:41 AM
Subject: Issue 275 in gwt-google-apis: GWT-Gadgets hosted mode fails when
using GWT 1.6.x and gwt-gadgets-1.0.2.jar
To: [email protected]
Status: Accepted
Owner: galgwt.reviews
Labels: Type-Defect Priority-Medium API-Gadgets
New issue 275 by galgwt.reviews: GWT-Gadgets hosted mode fails when using
GWT 1.6.x and gwt-gadgets-1.0.2.jar
http://code.google.com/p/gwt-google-apis/issues/detail?id=275
Found in Release:
Gadgets 1.0.2 + GWT 1.6.4
Detailed description:
The symptoms look similar to issue 199. See comments from Haziz later in
the report.
It seems that some part of the GadgetTemplate is being substituted when the
gwt-gadget.jar file is built, and not evaluated when the compiler actually
runs. This ends up with external.gwtOnLoad() being called with '1.5' as
the third parameter instead of '1.6'.
Workaround if you have one:
Rebuild gwt-gadgets.jar using GWT 1.6 or build from source code.
Links to the relevant GWT Developer Forum posts:
http://groups.google.com/group/gwt-google-apis/browse_thread/thread/80eef7e63392d3aa#
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---