Hello. I want to have my own editor to popup when clicking in my timeline, so i have added listeners to the plus-button. I have also added an eventclickhandler.
These two work fine, but i also want my custom editor when clicking in the background where there is no event. I have therefor tried to just add a "background" clickhandler that only does SC.say(), like this:
However, when i click on various locations in my timeline background, i only get the sc.say sometimes. A lot of times i get very weird errors in the module log.
I am unsure how to deal with this, but it feels unlikely to be something wrong with my clickhandler.
Trace below (5.0-p20150808, Firefox and Chrome):
ERROR: 23:48:10.349:MUP9:WARN:Log:Uncaught JavaScript exception: TypeError: _8 is undefined in http://127.0.0.1:8888/xxxx/sc/modules/ISC_Calendar.js, line 310
com.smartgwt.client.core.JsObject$SGWT_WARN: 23:48:10.349:MUP9:WARN:Log:Uncaught JavaScript exception: TypeError: _8 is undefined in http://127.0.0.1:8888/xxxx/sc/modules/ISC_Calendar.js, line 310
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
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.smartgwt.client.util.SC.logWarn(SC.java)
at com.smartgwt.client.util.LogUtil.handleOnError(LogUtil.java:35)
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.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:695)
ERROR: 23:48:17.825:MUP6:WARN:Log:TypeError: _8 is undefined
Stack from error.stack:
TimelineView.cellMouseUp() @ xxxx/sc/modules/ISC_Calendar.js:310
anonymous() @ nuba/sc/modules/ISC_Core.js:77
GridRenderer.mouseUp() @ xxxx/sc/modules/ISC_Grids.js:692
[a]MathFunction.invokeSuper() @ xxxx/sc/modules/ISC_Core.js:281
[a]MathFunction.Super() @ xxxx/sc/modules/ISC_Core.js:273
GridBody.mouseUp() @ xxxx/sc/modules/ISC_Grids.js:830
Canvas.handleMouseUp() @ xxxx/sc/modules/ISC_Core.js:2822
[c]EventHandler.bubbleEvent() @ xxxx/sc/modules/ISC_Core.js:1570
EventHandler._handleMouseUp() @ xxxx/sc/modules/ISC_Core.js:1412
[c]EventHandler.handleMouseUp() @ xxxx/sc/modules/ISC_Core.js:1407
[c]EventHandler.dispatch() @ xxxx/sc/modules/ISC_Core.js:1645
anonymous() @ xxxx/sc/modules/ISC_Core.js:76
These two work fine, but i also want my custom editor when clicking in the background where there is no event. I have therefor tried to just add a "background" clickhandler that only does SC.say(), like this:
Code:
timeline.addBackgroundClickHandler(new BackgroundClickHandler() { @Override public void onBackgroundClick(BackgroundClickEvent backgroundClickEvent) { SC.say("HELLO!!"); //backgroundClickEvent.cancel(); } });
I am unsure how to deal with this, but it feels unlikely to be something wrong with my clickhandler.
Trace below (5.0-p20150808, Firefox and Chrome):
ERROR: 23:48:10.349:MUP9:WARN:Log:Uncaught JavaScript exception: TypeError: _8 is undefined in http://127.0.0.1:8888/xxxx/sc/modules/ISC_Calendar.js, line 310
com.smartgwt.client.core.JsObject$SGWT_WARN: 23:48:10.349:MUP9:WARN:Log:Uncaught JavaScript exception: TypeError: _8 is undefined in http://127.0.0.1:8888/xxxx/sc/modules/ISC_Calendar.js, line 310
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
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.smartgwt.client.util.SC.logWarn(SC.java)
at com.smartgwt.client.util.LogUtil.handleOnError(LogUtil.java:35)
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.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:695)
ERROR: 23:48:17.825:MUP6:WARN:Log:TypeError: _8 is undefined
Stack from error.stack:
TimelineView.cellMouseUp() @ xxxx/sc/modules/ISC_Calendar.js:310
anonymous() @ nuba/sc/modules/ISC_Core.js:77
GridRenderer.mouseUp() @ xxxx/sc/modules/ISC_Grids.js:692
[a]MathFunction.invokeSuper() @ xxxx/sc/modules/ISC_Core.js:281
[a]MathFunction.Super() @ xxxx/sc/modules/ISC_Core.js:273
GridBody.mouseUp() @ xxxx/sc/modules/ISC_Grids.js:830
Canvas.handleMouseUp() @ xxxx/sc/modules/ISC_Core.js:2822
[c]EventHandler.bubbleEvent() @ xxxx/sc/modules/ISC_Core.js:1570
EventHandler._handleMouseUp() @ xxxx/sc/modules/ISC_Core.js:1412
[c]EventHandler.handleMouseUp() @ xxxx/sc/modules/ISC_Core.js:1407
[c]EventHandler.dispatch() @ xxxx/sc/modules/ISC_Core.js:1645
anonymous() @ xxxx/sc/modules/ISC_Core.js:76
Comment