Dear Bob,

1. Your proposal (below) sounds fine to me. I agree that I don't see 
why exit should stop e.g. spinning. That is counterintuitive to me. 
(I used exit because soon after JTAT is loaded, there is a long 
running script that fades in and fades out an echo -- I didn't want a 
spin toggle to have to wait until after that is completed.)

As I understand your proposal, exit will no longer stop spinning, and 
therefore the problem I encountered will disappear.

2. I missed the new feature to precede a command with "!". Where is 
that in the documentation? I expected to find it under [Jmol command 
syntax] but it is not there (should be, I think).

It might be good to have #, ! (others?) listed as "commands" with 
their own sections in the documentation. I know that # is under 
comment, but a cross-ref # could link to comment.

3. If !show spin causes that command to be executed IMMEDIATELY, IN 
THE MIDDLE of an already-running script, enabling the already running 
script to resume after "show spin", that is EXACTLY what I need, 
instead of exit (which was a kludge).

4. In other situations, I have indeed used _spinning with Jmol script 
conditionals to toggle spinning. However, in this case, there can be 
up to 4 Jmols, and I want them all to spin, or all to not spin, not a 
mixture. So I am polling just the first Jmol and then sending 
explicit spin commands to all the others so they stay in the same 
mode. I'm sure I could have done that in other ways, including with 
the use of _spinning. However, I have working code, so I don't see 
any need to change it unless Jmol becomes incompatible with it, which 
apparently is not anticipated in this instance.

5. I suspect it makes the most sense to have "exit" NOT clear running 
setTimeouts, so one can exit executing scripts except for 
setTimeouts. Then of course, "!exit" could clear setTimeouts as well.

Thanks very much for digging into this. -Eric

At 8/24/10, Robert Hanson wrote:
>Eric, here's the scoop.
>
>There are a few undocumented features of quit and exit, and yes, 
>there was a change there. (That we can certainly undo.)
>
>Right now:
>
>from the command line:
>
>"exit" clears he script queue, stops all processes, including 
>scripts, spinning, and minimization.
>"quit" stops any currently running script and also stops minimization.
>"!exit" does the same
>"!quit" does the same
>
>at the beginning of a script:
>
>"exit" stops all processes and stops spinning (that last, I think, is a bug).
>"quit" stops the currently running script and clears the script queue.
>"!exit" clears the script queue, stops all processes, including 
>scripts, spinning, and minimization, and then runs the script.
>"!quit" stops any currently running scripts, stops minimization, and 
>then runs the script.
>
>anywhere else within a script:
>
>"exit" clears all pending scripts and then exits the current script.
>"quit" or "return" just exits the currently running script and 
>continues others that are pending. But I think there might be a bug 
>there with "quit" if it occurs within a for or while loop AND the 
>script is being called by another script file.
>
>I need to test that.
>
>I propose the following -- script or command line:
>
>"exit" stops all scripts and clears the script queue.
>"quit" stops the currently running script.
>"!exit" clears the script queue, stops all processes, including 
>scripts, spinning, and minimization.
>"!quit" stops any currently running scripts, stops spinning, and 
>stops minimization.
>
>
>What do you think?
>
>Bob
>
>ps. Why would you want the toggle spin on/off to also clear the 
>script queue, by the way? Wouldn't it be better just to use
>
>!show spin
>
>or if you want to use the newer method:
>
>!if(_spinning){spin off} else {spin on}
>
>so that you are interrupting any currently running script but not 
>wiping it out?
>
>Bob
>
>
>--
>Robert M. Hanson


------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to