i have this code:
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
public class testModule implements EntryPoint {
public void onModuleLoad() {
Label label = new Label();
label.setText("Hola");
Panel mainPanel = new Panel(){
{
setSize("10px", "20px");
}
@Override
public boolean remove(Widget child) {
// TODO Auto-generated method stub
return remove(child);
}
public Iterator<Widget> iterator() {
// TODO Auto-generated method stub
return iterator();
}
};
RootPanel.get().add(label);
RootPanel.get().add(mainPanel);
}
}
------
and the error is:
[ERROR] Unable to load module entry point class
cl.ss.autitos.client.testModule (see associated exception for details)
java.lang.AssertionError: This UIObject's element is not set; you may
be missing a call to either Composite.initWidget() or
UIObject.setElement()
at com.google.gwt.user.client.ui.UIObject.getElement(UIObject.java:
511)
at com.google.gwt.user.client.ui.UIObject.setWidth(UIObject.java:700)
at com.google.gwt.user.client.ui.UIObject.setSize(UIObject.java:639)
at cl.ss.autitos.client.testModule$1.<init>(testModule.java:20)
at cl.ss.autitos.client.testModule.onModuleLoad(testModule.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:
329)
at com.google.gwt.dev.shell.moz.BrowserWidgetMoz.access
$100(BrowserWidgetMoz.java:35)
at com.google.gwt.dev.shell.moz.BrowserWidgetMoz
$ExternalObjectImpl.gwtOnLoad(BrowserWidgetMoz.java:59)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:
1428)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
------
i don't now what error is..... help me please
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---