>>>* an Applet-to-JavaScript "MessageCallBack" & "PickCallBack"
>>>   (that I can handle (at least) the Atomnumber and -Symbol in a
>>> JavaScript)
>>
>> Jmol v10 prerelease does this today.
>>
> Oh, that's great!!!  I've just played with it a bit.

Good.

> When I do:
>
> <APPLET name="jmol" archive="JmolApplet.jar" code="JmolApplet"
>          mayscript="true" height="600" width="600">
> <PARAM name="emulate" value="chime" />
> <PARAM name="debugscript" value="true" />
> <PARAM name="MessageCallBack" value="messageCallback" />
> <PARAM name="PickCallBack" value="pickCallback" />
> <PARAM name="load" value="molecule.xyz" />
> <PARAM name="script" value="select all; wireframe 0.1; cpk 0.5"/>
> </APPLET>
> <script language="JavaScript">
> <!--
>       function messageCallback(args) {
>               alert("MessageCallback\n"+args+"\n");
>       }
>       function pickCallback(args) {
>               alert("PickCallback\n"+args+"\n");
>       }
> //-->
> </script>
>
> with Jmol10pre5 the CallBack String only contains the name of the applet
> (in this case "jmol").

There are multiple arguments to the callback.
 MessageCallback(appletName, message)
 PickCallback(appletName, pickMessage, atomIndex)

I suspect that the atomIndex that is passed back to the PickCallback is
wrong. It is probably zero-based. If it is not doing the right thing then
tell me and I will fix it.


> Is there any Documentation on that feature? Is it already complete?

There is currently no documentation.

It is designed to be compatible with existing web pages designed for the
Chime plug-in. Look for the Chime documentation.


Enjoy!

Miguel





-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to