Hi Bob,

> I think you have to be careful not to call JmolScriptWait from a script that
> is already running from a callback message. Not sure if that's the case

I think you just pointed out the problem here. I was calling JmolScriptWait 
from a "pickCallBack".
But what goes wrong with that?

> here, but are you sure you need JmolScriptWait? I can't remember what the
> context is of this. What is invoking this script?

I have a javascript function myFunc() which should be executed every time I 
click in the Jmol Applet.
So I have this:
jmolSetCallback("pickCallback", "myFunc")' 

myFunc() {
        jmolScript(....);       //changes to Jmol display and some Jmol 
variables; 
        myOtherFunc();  // a javascript function I defined which uses some Jmol 
variables
                                        // and therefore must be executed when 
the previous jmolScript() is done.
}

I found that, the output of myFunc() is one or a few clicks lag behind my 
actual clicks. So I thought 
I should use jmolScriptWait(). Or is there a better way to solve this?

> I don't see that JavaScript call working for any browser, unless you for the
> purposes of Email broke up those lines. In JavaScript you would need to
> escape the line terminations using "\":

I did break the call to several lines just in the email.

Thanks.

Yingjie

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to