Bob,
I know that I need to try to get rid of those JavaScript timeouts. The
construct jmolScriptWait(scpt) sounds interesting. I'm not familiar with
it. In the following example, what is jmolScriptWait(scpt) waiting for?
Is it that scpt does not execute until all of the subsequent JavaScript
executes?
jmolScriptWait(scpt);
mepsData = true;
if (moData) {
toolMenu()
} else {
editMenu()
}
getFormula()
Most of my timeouts are used with my getFormula() or a context similar
to my getFormula(). To reduce these timeouts to their essence, here is
what's going on:
1) jmolScript related to model changing is fired in a JavaScript
function via jmolScript() - i.e. model kit editing.
IN SUBSEQUENT getFormula()
2) jmolGetPropertyAsArray("moleculeInfo.mf") is fired.
3) jmolScript making use of message call back to get new SMILES for
JavaScript global variable is fired.
I know that 2 and 3 must wait for 1 to complete. I think the order of 2
and 3 is irrelevant - not sure?? I'd sure like to lose setTimeOut as the
referee that keep these guys in order. Will jmolScriptWait() do this?
Otis
Otis Rothenberger
chemagic.com
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users