Hi Bob,
I tried it on my Mac (OS X 10.4.4) with Safari 2.0.3 and it all
seemed to work fine.
Pretty nifty.
René
On Feb 7, 2006, at 4:41 PM, Bob Hanson wrote:
Jmol developers and users -- applet:
I'm developing a simple JavaScript interface that could in
principle replace many or all requirements for applet callbacks.
The development page is at
http://www.stolaf.edu/people/hansonr/jmol/test/json/json.htm
This uses a so-far-unreleased version of the Jmol applet. I'm
interested in whether this page works for you, especially if you
have a Mac. It uses a communication method we haven't used before
with the applet -- direct synchronous JavaScript, using JSON
(JavaScript Object Notation). That is, you call the function
info=jmolApplet0.getProperty("atomInfo","(selected and not water)")
for example,
and the "info" variable is directly filled with the requested
information. This is in contrast to
jmolApplet0.script()
for example, which does not directly return a value -- operates
"asynchronously".
Two nice examples of what this can do are there:
1. Click on "monitor orientation on/off" and then drag the model
around. Fun, eh?
2. Drag the model with zoom and then click on "load THIS
orientation". You won't see much more than a flutter, yet the model
has been completely reloaded. That's because it uses
info=jmolAppletX.getProperty("orientationInfo")
to first get the current orientation and
info=jmolAppletX.getProperty("fileName")
to get the currently loaded file name, then puts them together into
a single script to reload the file with a set of rotations to
reorient it as before.
Please do give this a try and let me know what you think.
I have some ideas of how we could use this to completely replace
callbacks (replacing them with setTimeout() polling of Jmol
properties instead).
Bob Hanson
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
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-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers
-------------------------------------------------------
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&kid3432&bid#0486&dat1642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers