So, I am developing an application in GWT for the embedded web browser (Sketchup). I can control Sketchup by changing the value of window.location to "skp :: myFunciton @myParams". Sketchup can execute javascript in a browser. What I want to do is ask sketchup to give me the contents of my model.
public static native void getModel() ;
After the second sketch has a result. But how do we get back to gwt? The problem is that the entrypoint instance starts the request, and JSNI can only display static methods in javascript.
I thought I had a solution with events and elements ...
//Sketchup javascript var gwtwidget = document.getElementById("myTextArea") gwtwidget.value = "blahblah"; gwtwidget.onchange();
and then listening to the change in the GWT. Alas, this does not work. Gwt's own event system redefines, absorbs, disables (or something else) the event. Which approach should I take? I was on the Internet looking for information, but I certainly can not get around it. I guess the answer is either ...
1 Call the entry point instance method from javascript (anyway)
2 Fire event from javascript to be raised by gwt (anyway)
3 Configure the asynchronous callback interface mechanism (somehow)
source share