On 12 March 2012 09:49, Cristian Rinaldi <csrina...@gmail.com> wrote: > I have two modules, each with your EntryPoint. > Each EntryPoint initializes a part of the UI based on the IDs of element in > the HostPage. > > Host Page: > <!doctype html> > <html> > <head> > <meta http-equiv="content-type" content="text/html; charset=UTF-8"> > <link type="text/css" rel="stylesheet" href="PP.css"> > <title>Web Application Starter Project</title> > <script type="text/javascript" language="javascript" > src="pp/pp.nocache.js"></script> > <script type="text/javascript" language="javascript" > src="core/core.nocache.js"></script> > </head> > <body> > <h1>Web Application Starter Project</h1> > <div id="modulo1"></div> > <div id="modulo2"></div> > </body> > </html> > > Module PP > <?xml version="1.0" encoding="UTF-8"?> > <module rename-to='pp'> > <inherits name='com.google.gwt.user.User'/> > <inherits name='com.google.gwt.user.theme.clean.Clean'/> > <entry-point class='com.logikas.pp.client.PP'/> > <source path='client'/> > <source path='shared'/> > </module> > > EntryPoint of Module PP > public class PP implements EntryPoint { > public void onModuleLoad() { > RootPanel.get("modulo1").add(new Label("Modulo 1 Load!!!!!")); > } > } > > Modulo Core > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.4.0//EN" > "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd"> > <module rename-to="core"> > <inherits name="com.google.gwt.user.User" /> > <source path="client" /> > <entry-point class="com.logikas.core.client.Core" /> > </module> > > EntryPoint of Core > public class Core implements EntryPoint { > @Override > public void onModuleLoad() { > RootPanel.get("modulo2").add(new Label("Modulo 2 Load!!!!!")); > } > } > > In Development Mode the code throws errors: > com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object > HTMLDivElement] has no method 'createElement' > at > com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248) > at > com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) > at > com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) > at > com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) > at > com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) > at com.google.gwt.dom.client.DOMImpl.createElement(DOMImpl.java) > at > com.google.gwt.dom.client.Document$.createDivElement$(Document.java:290) > at com.google.gwt.user.client.ui.LabelBase.<init>(LabelBase.java:52) > at com.google.gwt.user.client.ui.Label.<init>(Label.java:141) > at com.google.gwt.user.client.ui.Label.<init>(Label.java:151) > at com.logikas.pp.client.PP.onModuleLoad(PP.java:13) > 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:396) > at > com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) > at > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525) > at > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) > at java.lang.Thread.run(Thread.java:662) > > In Production Mode there are no errors.
When I see strange behaviour like that I run a full clean build and that has always fixed such problems. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.