Bob,
Wonderful. I'll let you know how it works.
Thanks again.
Steve
>
Yes, this information comes back as a string in the pickCallback (second
parameter). The third parameter is an atom index:
0+ atom
-2 draw
-3 bond
Also, you can always check the most recent pick information using
var x = jmolEvaluate(_pickInfo)
or
var x = jmolEvaluate(_atomPicked)
You should be able to parse that as a JavaScript array directly:
var info = eval(jmolEvaluate(_pickInfo))
or from that second parameter, HOWEVER -- strings passed back to JavaScript
are Java strings, not JavaScript strings, so ALWAYS do
"" + xxx
to turn them into JavaScript strings before you do anything with them. So in
a callback:
function myPickCallback(app, msg, atomIndex) {
var info = eval("" + msg)
}
not just
function myPickCallback(app, msg, atomIndex) {
var info = eval(msg)
}
Bob
Steven Spilatro
Dept of Biology and Environmental Science
Marietta College
----------------------------------------------------------------
This message was sent using Marietta College WebMail.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users