I am using Smart GWT 3.0- specifically I am working with the rotate sample that uses drawing class.
I have changed the triangle drawn, and instead want to show a image in its place- I want this image to rotate in the same way as the other shapes are rotated when the user clicks on slider ( as shown in showcase)
There is no error shown in eclipse after I have modified the code and saved it.
I have changed the triangle shape code and replaced it with the following--
DrawImage drawImg= new DrawImage();
drawImg.setSrc("other/earth.png");
drawImg.setDrawPane(drawPane);
drawImg.setLeft(100);
drawImg.setHeight(100);
drawImg.draw();
However an "Uncaught Exception" error is shown when I run GWT Dev mode and try to see the html page containing the drawings.
Given below is the error I get in Google Chrome when the app fails to run--
onModuleLoad() threw an exception
Exception while loading module com.arvindikchari.bspinner.client.Spinner. See Development Mode for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'create' of undefined
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.smartgwt.client.widgets.drawing.DrawPane.create(DrawPane.java)
at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:361)
at com.smartgwt.client.widgets.layout.Layout.addMember(Layout.java:1153)
at com.arvindikchari.bspinner.client.Spinner.onModuleLoad(Spinner.java:244)
... 9 more
What do I have to do to correct this error?
Regards,
Arvind.
I have changed the triangle drawn, and instead want to show a image in its place- I want this image to rotate in the same way as the other shapes are rotated when the user clicks on slider ( as shown in showcase)
There is no error shown in eclipse after I have modified the code and saved it.
I have changed the triangle shape code and replaced it with the following--
DrawImage drawImg= new DrawImage();
drawImg.setSrc("other/earth.png");
drawImg.setDrawPane(drawPane);
drawImg.setLeft(100);
drawImg.setHeight(100);
drawImg.draw();
However an "Uncaught Exception" error is shown when I run GWT Dev mode and try to see the html page containing the drawings.
Given below is the error I get in Google Chrome when the app fails to run--
onModuleLoad() threw an exception
Exception while loading module com.arvindikchari.bspinner.client.Spinner. See Development Mode for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'create' of undefined
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.smartgwt.client.widgets.drawing.DrawPane.create(DrawPane.java)
at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:361)
at com.smartgwt.client.widgets.layout.Layout.addMember(Layout.java:1153)
at com.arvindikchari.bspinner.client.Spinner.onModuleLoad(Spinner.java:244)
... 9 more
What do I have to do to correct this error?
Regards,
Arvind.
Comment