This is happening on GWT 1.7 sometimes and randomly on an Ubuntu box
using FF3.0
The exception first happened in an imatge.setWidth (that was GWT
1.5.3), so I added a getElement check (and reordered the code)
Now it is happening in the constructor, which is weird and out of
control...
** This is the Java Code
public class Aplicacio extends Composite {
protected Image imatge;
public class AplicacioEnFila extends Aplicacio {
public AplicacioEnFila(Comanda comanda) {
try {
imatge = new Image();
if (imatge.getElement() == null)
throw new Exception("imatge.getElement() te valor nul");
imatge.setWidth("16px");
(...)
} catch (Exception e) {
Window.alert("Error en creacio d'imatge en fila\n" + e.toString());
}
** This is what the alert displays (customer details removed to
protect the innocent ;-)
Error en creacio d'imatge en fila
com.google.gwt.core.client.JavaScriptException: (TypeError): this
$static.element is null
fileName: [HIDDEN CUSTOMER DATA]/
342A75AB1DA4E1C68E9F4363D8996F43.cache.html
lineNumber: 7514
stack: $Image([object Object])@[HIDDEN CUSTOMER DATA]/
342A75AB1DA4E1C68E9F4363D8996F43.cache.html:7514
$AplicacioEnFila([object Object],[object Object])@[HIDDEN CUSTOMER
DATA]/342A75AB1DA4E1C68E9F4363D8996F43.cache.html:14261
mostrarAplicacions([object Array])@[HIDDEN CUSTOMER DATA]/
342A75AB1DA4E1C68E9F4363D8996F43.cache.html:15712
onSuccess_3([object Array])@[HIDDEN CUSTOMER DATA]/
342A75AB1DA4E1C68E9F4363D8996F43.cache.html:15823
** This is the stack and the Javascript code it relates to:
$Image([object Object])@[HIDDEN CUSTOMER DATA]/
342A75AB1DA4E1C68E9F4363D8996F43.cache.html:7514
Javascript:
function $Image(this$static){
$clinit_241();
this$static.state = $Image$UnclippedState(new Image$UnclippedState
(), this$static);
------ Line 7514 ------
this$static.element['className'] = 'gwt-Image';
return this$static;
}
$AplicacioEnFila([object Object],[object Object])@[HIDDEN CUSTOMER
DATA]/342A75AB1DA4E1C68E9F4363D8996F43.cache.html:14261
try {
------ Line 14261 ----------------
this$static.imatge = $Image(new Image_0());
if (!this$static.imatge.element)
throw $Exception(new Exception(), 'imatge.getElement() te valor
nul');
I have taken a look at function $clinit_241(), but I must say I am no
good at OO JavaScript...
Any tips will be appreciated...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---