Michael Weisheit wrote: >> It's: >> >> ((com.xmlmind.xmleditapp.app.ApplicationBase) app).getApplet() >> >> See >> http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/app/ApplicationBase.html#getApplet() >> >> Now, how to access *app* ? the answer is: it depends on the kind of >> extension you write. (No, there is no global variable pointing to the >> application object.) >> >> For example, any application part (AppAction, AppTool, etc) has access >> to the application which contains it. See for example: >> http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/kit/AppAction.html#app >> >> > > Hi, > > I got it. It's not a big deal. I just wrote a subclass of AppTool which > executes these lines when a button is clicked: > > Applet applet = ((com.xmlmind.xmleditapp.app.ApplicationBase) > app).getApplet(); > JSObject win = JSObject.getWindow(applet); > win.call("showAlert", null); > > Also in the plugin, you have to include the "plugin.jar" from %JRE-HOME%\lib\ > to use the class JSObject. And add this jar to the cp in the build.xml. > > Then add to the html-Header this example function: > > function showAlert() { > alert('See this nice javascript alert called from inside the > applet!'); > } > > > Now it should work fine. >
Thank your for this feedback.

