Perfect. That is precisely what I predicted:

-- Console not affected by settings, everything works.


On Fri, Sep 16, 2011 at 6:25 PM, Paul Pillot <
[email protected]> wrote:

Here are the results :

   - From Javascript, useCommandThread set
      - 1 : OK
      - 2 : Error
      - 3 : OK
      - 4 : Error



1 : load "somefile"
2 : load "somefile"; javascript "alert('done')"
3 : load "somefile";/*SPLIT*/;javascript "alert('done')"
4 : load "somefile"; #javascript


#1: WORKS: load command is being run using the applet load thread. Good.
#2: FAILS:  load and javascript commands cannot be executed by the same
thread. Should not work, and doesn't.
#3: WORKS: load and javascript commands are executed by different threads so
that they both work. One is executed by the original applet loading thread,
so it has access to files; the other is executed by a user event derived
thread, so it has access to JavaScript. This is done in proper order,
despite the SPLIT business.
#4: FAILS: "#javascript" meaning "run this command using the user event
thread", just like useCommandThread FALSE -- should not work, and doesn't
(because it forces a (rogue) access violation.

Notice that when using useCommandThread, you cannot mix Jmol load and
javascript commands (a common thing to do, of course, to signal, for
example, a completed load script).


We should try callbacks as well. Specifically, a loadStructCallback that
also carries out a JmolScript command. (Not recommended anyway, but it would
be good to know if that absolutely does not work.) In some of these cases,
this might hang the browser.

Bob

------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> http://p.sf.net/sfu/rim-devcon-copy2
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to