OK my bad, I called the Java object implementing the interface
directly within the callback function which I think is a mistake. I
stored it to a js variable and used that variable in the js callback
function and that worked.
Thanks Alain for the help.
On Aug 1, 12:04 pm, Thomas Lefort
Hi Thanks for your answer.
I have tried and I am getting some weird js error message
this.setPosition is not a function referring to a random line from
the html file itself, so it looks like firebug is completely lost.
My code is:
public native UniMarkerJSNI
Hi,
I have the following:
interface I {
myInterfaceFunction
}
A implements I {
}
B implements I {
}
I want to pass A or B using interface I to a js code I am writting, ie
public native void makeUseOfI(I myObjectAorB) /*-{
var val = myObjectAorB.@pkg.I.myInterfaceFunction();
Yes it s possible.
But you might want to actually call the function in the JSNI in the right
way.(see bold entry)
public native void makeUseOfI(I myObjectAorB) /*-{
var val = myObjectAorB.@pkg.I*::*myInterfaceFunction()*();*
$wnd.whateverFunction(val)
}-*/;
2011/7/27 Thomas Lefort