I try to handle a Summernote Keyup event with this:
myEditor.addSummernoteKeyUpHandler(new SummernoteKeyUpHandler() {
@Override
public void onSummernoteKeyUp(final SummernoteKeyUpEvent event) {
// TODO Auto-generated method stub
log.fine("hello");
}
});
I get a UmbrellaException which is IMHO a class cast exception.
I identified the following spot where te cast failes:
@HasNoSideEffects
static native boolean canCast(Object src, JavaScriptObject dstId) /*-{
if (@com.google.gwt.lang.Cast::instanceOfString(*)(src)) {
return [email protected]::stringCastMap[dstId];
} else if ([email protected]::castableTypeMap) {
return [email protected]::castableTypeMap[dstId]; //<-- this returns false!!!
} else if (@com.google.gwt.lang.Cast::instanceOfDouble(*)(src)) {
return [email protected]::doubleCastMap[dstId];
} else if (@com.google.gwt.lang.Cast::instanceOfBoolean(*)(src)) {
return [email protected]::booleanCastMap[dstId];
}
return false;
}-*/;
dstId contains:
Any help greatly appreciated!
I tested this with a small demo which actually works. But in my large application, I get this exception and I don't see why.
Do you have any idea whats wrong here?
Best regards Hannes
As Andrei suggested I set the style to DETAILED. I use Eclipse as a development environment. I decided to clean build the system (which I had done before). Now the problem has simply vanished !! Furthermore, I use SDBG (see: https://sdbg.github.io/) to debug my GWT application. This works pretty well (even without -style DETAILED). Now the very very strange thing remains. I can set breakpoints for my application and they all work well, except setting a breakpoint within the event handling method. I use a logger to print some text to the console, so I see that the event handler for summernote is actually called but the debugger will not stop. I checked whether the breakpoint is listed in the tab "Breakpoints" and it is and it is checked. I don't get it. Perhaps I have to rebuild all again.
But to keep long things short: The solution to the problem is probably to really issue a clean build and then hope for the best.