I am debugging the bootstrap js script to find out what is going wrong and I am a bit confused, please some help?
-- It seems that the bootstrap script throws an exception that is silently ignored, such that the strongName variable is undefined, such that it tries to load undefined.cache.js..
BTW: I noticed this issue: 8135, that also had problems solving a bootstrap issue as the same exception is silently ignored. Please improve this exception handling.
Anyway: I have defined a property called "browser.engine" (with the help of @Thomas) as specified below (in it's own gwt xml file). Because it's a derived property, I haven't specified a property provider. However, as far as I understand, an exception occurs as in the bootstrap script as it can't find a property provider.
In the boostrap script that is included in the index.html file the following line determines the strong name (that fails):
strongName = answers[computePropValue($intern_47)][computePropValue($intern_48)][computePropValue($intern_59)];
It fails on the first call, namely: computePropValue($intern_47)
With $intern_47 containing "browser.engine".
Below the method being called. This line results a value null, such that an exception is thrown:
var value = providers[propName](), allowedValuesMap = values[propName];
Because "browser.egine" is a derived property, it contains no provider, but as such an exception is thrown.
What is going wrong here ? please some help?
----
function computePropValue(propName){
var value = providers[propName](), allowedValuesMap = values[propName];
if (value in allowedValuesMap) {
return value;
}
var allowedValuesList = [];
for (var k in allowedValuesMap) {
allowedValuesList[allowedValuesMap[k]] = k;
}
if (__propertyErrorFunc) {
__propertyErrorFunc(propName, allowedValuesList, value);
}
throw null;
}
-----
The Property in it's own BrowserEngine.gwt.xml file:
----
<module>
<define-property name="browser.engine" values="gecko,webkit,presto,trident" />
<set-property name="browser.engine" value="gecko">
<when-property-is name="user.agent" value="gecko1_8" />
</set-property>
<set-property name="browser.engine" value="webkit">
<when-property-is name="user.agent" value="safari" />
</set-property>
<set-property name="browser.engine" value="presto">
<when-property-is name="user.agent" value="opera" />
</set-property>
<set-property name="browser.engine" value="trident">
<any>
<when-property-is name="user.agent" value="ie6" />
<when-property-is name="user.agent" value="ie8" />
<!-- ie9 and ie10 will fallback to ie8 -->
</any>
</set-property>
</module>
-----
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/groups/opt_out.
No comments:
Post a Comment