> hi Bob,
>
> On 2005-01-02 (09:57) Bob Hanson wrote:
>>
>>timothy driscoll wrote:
>>
>>>how would the polling function get the data from Jmol?  the only
>>>mechanism I know is the callback mechanism :-(
>>
>>Just execute an applet method that returns a value rather than a
>>void, such as
>>
>>document.jmol.getAppletInfo()
>>
>>No callback required there.
>>
>
> I would be very happy with a set of applet methods that return values
> (isn't this the subject of another active thread on the list?).  then my
> own js could read the values when they want.
>
>
>
>>>what data would be returned to the polling function?  a script is
>>>done, a structure is loaded, a selection is made, etc.?
>>>
>>
>>I imagine something like:
>>
>>public Boolean jmol.isScriptCompleted()
>>public String jmol.getMessage()
>>public String jmol.setMessage()
>>
>>public Boolean jmol.isStructureLoaded()
>>public Boolean jmol.isStructureDisplayed()
>>public String jmol.getFileName()
>>public String jmol.getFileContents()
>>
>>public Boolean jmol.isAtomPicked()
>>public String jmol.getSelectedAtomList()
>>public String jmol.setSelectedAtomList()
>>public String jmol.getMeasurement()
>>
>>public Boolean jmol.isFrameChanged()
>>public Integer jmol.getCurrentFrame()
>>public Integer jmol.setCurrentFrame()
>>
>
> I begin to see that I missed the point of the polling function. :-)
> please forgive my ignorance.  I thought it would be the only communication
> between js and applet, replacing the callbacks that (AFAIK) have been the
> only communication up until now.
>
> it seems that I can use js to access jmol methods that return values, like
> getAppletInfo(), and I don't need to go through the callbacks at all.  is
> this essentially correct?

Depends, I think. If you are responging to user action, then you have to
either (a) periodically check for value changes -- isXXXXChanged() -- that
is, poll, or (b) get a callback based on a user or animation event from
Jmol. I think, then, once you have that control, then you can do the
getValueXXXX() sort of call to Jmol to get what is now available as a
result of that event.

Right?

Bob Hanson

>
>
>
> regards,
>
> tim d
> --
> Timothy Driscoll
> molvisions - see, grasp, learn.
> <http://www.molvisions.com/>
> usa:north carolina:wake forest
>
> "Basic research is when I'm doing what I don't know what I'm doing." -
> Wernher Von Braun
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Jmol-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to