On Aug 5, 12:27 am, George Georgovassilis <
g.georgovassi...@gmail.com>
wrote:
> A frequent cause is caching: for instance, if you assign a URL to an
> Image and the content of the URL is in the cache already, the browser
> may fire the onLoad event immediately...
Unfortunately, this issue occurs in the constructor of Label(), and
various other places in addition to the constructor for Image.
And now we just got a mysterious exception in
ClickListener.addClickListener(). This one looks particularly
ominous.
The exception I got was: "JavaScript TypeError exception:
this.clickListeners_0 is null" at line 10004.
GWT's Java code reads:
public void addClickListener(ClickListener listener) {
if (clickListeners == null) {
clickListeners = new ClickListenerCollection();
}
clickListeners.add(listener);
}
The generated javascript is:
function addClickListener_7(listener){
if (this.clickListeners_0 === null) {
this.clickListeners_0 = $ClickListenerCollection(new
ClickListenerCollection());
}
this.clickListeners_0.add_3(listener);
<--- Line 10004
}
...
function $ClickListenerCollection(this$static){
$ArrayList(this$static);
return this$static;
}
It looks like firefox is loosing the value during the "return" from
the constructor, or it is just dropping out of the hash table of
"this".