This discussion is archived
2 Replies Latest reply: Dec 12, 2012 12:02 AM by 971223 RSS

How do I use applet.onScriptStatus?

971223 Newbie
Currently Being Moderated
When we are launching the JVue applet quickly, multiple times in a row, we sometimes get into trouble and the feeling we get is that Java, or something else, at the client side, is pushed too hard. So, we have tried various ways to ask the currently executing viewer instance if it is "ready", or at least "half ready" before launching the next instance. We have had different success with different approaches, all the way from just waiting for X seconds before we launch the next viewer instance, to use methods like applet.waitForLastMethod. We always send in a JavaScript method to the ONINIT parameter of the applet, so that at least we are not trying to load a new instance before the applet is loaded. We have also tried the approach of calling getFileName, and when it returns non-null we at least know the document is loading and we can launch another viewer. The best thing would of course be if we could know then the loading/rendering is 100% complete.

The other day I found this method in the documentation:

ftp://active-project.com/jVue/docs/JavaDocs/VueBean/com/cimmetry/jvue/JVue.html#onScriptStatus(int, java.lang.String, java.lang.Object)

It sounds like this method could be used to "wait" until things have settled down before we give green light to process the next document. But it is not self evident how this method can be used. I have searched the web and can not find one single example on how it is used.

Any ideas?

Thanks!

/Mathias
  • 1. Re: How do I use applet.onScriptStatus?
    AutoVueAU Newbie
    Currently Being Moderated
    The onScriptStatus is the implementation of the ScriptStatusListener interface and should not be called from outside.
    You may use JVue.setStatusListener(String statusListener) : The statusListener is the name of a JavaScript function that will be called (by onScriptStatus) each time a script command gets executed.
    The statusListener parameters are similar to the onScriptStatus params.
  • 2. Re: How do I use applet.onScriptStatus?
    971223 Newbie
    Currently Being Moderated
    Thanks! We solved the problem some other way but I will keep this in mind if the need arises again.

    By the way, is there any place where I could have found this information myself, maybe with a small example?

    /Mathias

    Edited by: 968220 on 2012-dec-12 00:02

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points