I am not having a problem such as this at

http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/twoapp.htm

Thus, opening consoles on one or both of the applets has no effect on 
message callback.
Please let me know if the following does not work:

1) enter a command in one of the two jmolCommandInput boxes and press "Go"
 --> message should appear in textarea

2) open a console and enter a command there
 --> message should appear in textarea and console area

3) right click to get the pop-up menu, select show...orientation
 --> message should appear in textarea and console area

No?

By the way, you can more simply implement callback on only one of the 
applets by adding
an assignment of the message callback function to the jmolApplet 
definition script:

jmolApplet(400,'set messageCallback "messageProcess";load caffeine.xyz;...')

In this way only that applet gets the message callback.

Bob


Angel Herraez wrote:

>Hello. I have a problem with a simple callback, maybe somene with experience 
>can give me 
>a hand.
>
>Jmol 11.0.RC4
>I have a page with two applets. The second one is being monitored using 
>
>     jmolSetCallback("messageCallback", "messageProcess")
>
>Opening the Console (from the pop-up menu) locks the applet. This happens only 
>for the 
>applet being monitored by setCallback. Suppressing the "jmolSetCallback" 
>avoids the 
>problem.
>
>My "messageProcess" is a function that checks only spin status:
>
>function messageProcess(a,b)
>{      a = a.substring("jmolApplet".length)    // a will start with 
>"jmolApplet": strip and 
>leave just the ID part
>       if (a != "1") return    // only acts on second applet
>       //  SPIN DETECTION AND TOGGLE
>       if ( b.indexOf("set spin") != -1 )
>       {       if ( b.indexOf("spin on") != -1 )       //was spinning
>               {       jmolScript("spin off", a) 
>               }
>               else    //wasn't spinning
>               {       jmolScript("spin on", a) 
>               }
>       }
>       //  END of SPIN DETECTION AND TOGGLE
>}
>
>The function works perfectly, the problem iis only opening the console.
>
>Thanks for any help
>  
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to