I've committed to CVS a slight modification of the callback system.
In particular, for script message callbacks (that "Jmol executing script" message) the JavaScript interface now allows for:

mymessagecallbackfunction(target,message,additionalinfo)

where that third parameter is the script that is executing. This, of course, allows for better debugging and possibly better response to user action, because the web application now has information about WHICH button, for example, was pressed.

Of course, because JavaScript is loose with its function types, the standard format

mymessagecallbackfunction(target,message)

works just the same as always -- it just disregards the additionalinfo coming back. So this change won't have any bearing on any web applications already using callbacks.

I was trying to implement this so that on the "script completed" message there was also an indication of WHICH script was completed, but, alas, that requires a change to the JmolStatusListener interface (I think), and that's more involved (I know).

As part of this commit, I also added to the System.out messages on applet startup so that any callbacks are identified. Again, this is for better debugging.


Bob Hanson



-------------------------------------------------------
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

Reply via email to