On Wed, Jul 11, 2012 at 1:16 PM, Gusts Kaksis <gusts.kak...@gmail.com>wrote:
> Hello, it's me again!
>
> I just found out one interesting thing about Jmol applet and I wanted to
> clear things up. As it seems, the appletReadyCallback delivers 4th and
> undocumented attribute, which is an internal object of the applet
> (applet wrapper) with all the public methods? Is it so? Well I tested it
> and it works, and it works more reliable, than trying to catch the
> object with document.getElementById('applet_id'), which for some reason,
> every almost 2nd time threw an error message that object has no method
> called script(), again this object received by callback works flawlessly.
>
>
You are probably calling document.getElementById too early, before the
applet is initialized. This problem is solved using JmolApi.js. There is
not problem if you do it right. But there is also no need to use the
getElementById call. I get the sense you are going backward on this, not
forward. The API provides much better handling of calls to Jmol. Not sure
what you are after here.
> I pushed updates to GitHub now and updated my example page, and it would
> be nice if somebody could give me some response on testing.
>
> Source: https://github.com/gusc/jMol
> Examples and documentation: http://gusc.lv/jmol/
>
> Current testing results:
> Google Chrome on Windows - works
> Firefox 13.0.1 on Windows - works
> Safari 5.1.4 on Windows - still does not work, because it can not find JRE
> Safari 5.1.7 on Mac - works (at some point it didn't and it showed a
> security exception in Java console, then I read the article on Jmol wiki
> about UseCommandThread and that solved the problem)
> Opera 11.61 on Windows - works
> Internet Explorer 8.0 on Windows - works
>
>
We have never had any problems on any of these platforms, so I would be
surprised if you did.
> And I still have some questions about this JmolApplet class and it's
> public methods. I'm going to name them, and maybe somebody could send me
> some info about their usage. If I'm correct, then applet's entry point
> is located in this file:
>
> http://jmol.svn.sourceforge.net/viewvc/jmol/trunk/Jmol/src/JmolApplet.java?revision=16759&view=markup
> or is this the wrapper object returned to appletReadyCallback? So the
> methods:
>
>
Please see JmolApi.js. It covers all the public methods.
> String getPropertyAsString(String infoType)
> String getPropertyAsString(String infoType, String paramInfo)
> String getPropertyAsJSON(String infoType)
> String getPropertyAsJSON(String infoType, String paramInfo)
> Object getProperty(String infoType)
> Object getProperty(String infoType, String paramInfo)
> String loadInlineArray(String[] strModels, String script, boolean isAppend)
> String loadInlineString(String strModel, String script, boolean isAppend)
> String loadNodeId(String nodeId) - are thease connected to DOM object's
> ID attribute?
> String loadDOMNode(JSObject DOMNode) - same?
> void script(String script) - this one is clear, it's where all the
> scripting code goes
> void syncScript(String script)
> Object setStereoGraphics(boolean isStereo)
> String scriptNoWait(String script)
> String scriptCheck(String script)
> String scriptWait(String script)
> String scriptWait(String script, String statusParams)
> String scriptWaitOutput(String script)
>
> Can someone give me an explanation about input/output of thease methods
> and maybe some intentions on their usage?
>
>
See the code, and JmolApi.js. The DOM methods were an experiment that
didn't go anywhere, really.
> Gusts
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers