OK, I'm making my way through the resonses here. In the mean time I have
implemented (another) prototype that I would like people to take a look
at. See the files in
http://www.stolaf.edu/people/hansonr/jmol/test/json
in particular:
http://www.stolaf.edu/people/hansonr/jmol/test/json/json.htm
http://www.stolaf.edu/people/hansonr/jmol/test/json/callback.htm
http://www.stolaf.edu/people/hansonr/jmol/test/json/sync.htm
json.htm
This file demonstrates the proposed getProperty() command and its
varients, getPropertyAsString() and getPropertyAsJSON(). My favorites is
"extractModel".
callback.htm
The JavaScript in callback.htm is just a mess -- sorry -- I would
recommend not looking too closely at it. But what you can get from that
page is an idea of the SORT of "callback"-like information you should be
able to get soon.
sync.htm
Someone -- sorry, I can't find the message right now -- suggested that
this might be used for synchronizing two applets. Well, that sounded
fine to me. So I decided to see whether it would work. Why not 4? On
this page the jmolSynchronize() command is all you do. Just enter the
numbers of the applets you want to synchronize, so, for example:
jmolSynchronize(0,1,2,3,4,5) would sync the first 6 applets on the page.
You could of course first set them up with different display
characteristics. SOMEONE will use this!
Realize there are two related systems here -- status and properties. The
status idea is that Jmol now records internally when its state changes.
I think it's a pretty efficient method. It isn't a history, so it
doesn't grow hugely, and it won't save any status information until you
tell it what kind you want to look at. In addition to this, indepenent
of the callback issue -- but necessary for its replacement -- Jmol now
can deliver properties without accessing the "script" command.
Dan Kirshner wrote:
A question of my own:
Does your (impressive) demonstration at
http://www.stolaf.edu/people/hansonr/jmol/test/json/json.htm involve polling every 1/10
second or some such in order to get updated info (at least for the "orientation
info" link)?
yes, exactly. I'm polling every 100 ms. This seems to be quite fast
enough. See also the new sync.htm file.
Bob Hanson
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users