Thank you, Rolf
Yes, it seems that although the callbacks can be targeted to a jmolscript, it
does not allow to pick any parameters like it does in Javascript.
After all, even though I was developing in the Jmol aplication console, my
target is a webpage, so I have "outsourced" the processing to a Javascript
function that after checking the arguments returned by the callback, uses a
Jmol script to return the proper action.
In case anyone is interested, this is my example
// webpage, with 2 JSmol panels named jmol1 and jmol2
// script in Jmol (within two otherwise different spt files called by the page):
set MinimizationCallback "jmolMinim";
set echo top center;
echo "initial message"
minimize steps 250;
// Javascript in the page:
function jmolMinim() { //callback, reports starting / running / done
if (arguments[1]=='done') {
if (arguments[0]=='jmol1') {
Jmol.script(jmol1, 'echo "final message 1";')
} else if (arguments[0]=='jmol2') {
Jmol.script(jmol2, 'echo "final message 2";')
}
}
}
The effect is that "initial message" is displayed until the minimization
finishes,
then it is replaced by a different message in each JSmol.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users