Sunday, October 26, 2014

Re: Unable to use Elemental

It seems i can no longer instantiate objects as i was doing before since using Elemental.

I'm getting errors on this line for some reason:

Image imgPlay = new Image("img/Blue_Play_Button_Pressed_Down.svg");

I tried changing it to Image imgPlay = new Image(); but got the same error. This works fine when i'm not referencing Elemental.

The DevMode console displayed the following:

Caused by: com.google.gwt.core.client.JavaScriptException: (String) : Invoking an instance method on a null instance
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:80)
at com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:64)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:60)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.google.gwt.user.client.impl.DOMImplStandard.initEventSystem(DOMImplStandard.java)
at com.google.gwt.user.client.impl.DOMImpl.maybeInitializeEventSystem(DOMImpl.java:181)
at com.google.gwt.user.client.impl.DOMImplStandard.sinkEvents(DOMImplStandard.java:216)
at com.google.gwt.user.client.DOM.sinkEvents(DOM.java:1361)
at com.google.gwt.user.client.Event$.sinkEvents(Event.java:597)
at com.google.gwt.user.client.ui.Image$UnclippedState.<init>(Image.java:376)
at com.google.gwt.user.client.ui.Image.<init>(Image.java:510)
at com.example.elem.client.ElementalDemo.onModuleLoad(ElementalDemo.java:31)


On Sunday, 26 October 2014 19:32:54 UTC, Jens wrote:
Please could someone share any thoughts?

Putting gwt-elemental.jar on class path and inheriting elemental.Elemental is fine and it should work.

When you see "failed to load the module" you usually see the reason in the DevMode console. We can't guess reasons.

-- J.

--
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/d/optout.

No comments:

Post a Comment