impossible. The JavaScript can't continue past your second statement
until the script is completed. That said, realize that certain script
commands may take a "life of their own" and not wait -- animation
commands start their own threads, for example -- so they don't wait for
anything. If you want to wait for them, you have to add your own
delay <seconds>
command to the script.
To see if I am right, add this to your while {}:
document.title = "BOB IS WRONG!"
and see if it ever shows. :)
Bob
eric capps wrote:
> i'm passing some commands to jmol using setTimeout() in javascript,
> and i'm trying to insure that the current job is done before moving on
> to the next one, to prevent the stack from piling up. the following
> bit of code SEEMS to have improved things somewhat:
>
> var done = null;
> done = jmolScriptWait("frame " + file[frame]);
> while(done == null){
> }
>
>
> do you think this is actually doing anything though?
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users