Bob,
OK, your code works (with Safari whining) and my old code also works (no Safari
whining).
In my approach, the bind to double does not involve a conditional that also
includes binds. I can only guess that Safari is finding something to fuss about
with the nested binds.
Because things like this drive me nuts, I did some checking. Safari has no
issue with this general construct:
var ckIt = false;
bind "DOUBLE" "if(ckIt){ckIt=false;prompt('rats')}else{ckIt=true;prompt('double
rats')}"
unless you use the command bind in any context inside the conditional. Go
figure...
One question: DRAG and DOUBLE as bind arguments work (old Jmol). I use these a
lot. Would it be best for me to go back and change these all to
left-double-click and left-drag?
Otis
> On May 13, 2015, at 12:35 AM, Robert Hanson <hans...@stolaf.edu> wrote:
>
> http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.13_2015.05.12.zip
> <http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.13_2015.05.12.zip>
>
>
> Jmol.___JmolVersion="14.3.13_2015.05.12"
>
> bug fix: re-entering functions loses if/else state
> bug fix: more issues with low-resolution linear-z index lines.
> Need to compromise for isosurfaces and nucleic cartoons
> -- which became very slow to render with precision Z placement.
>
>
> The second fix there is in relation to a subtle mistake that Jmol's renderer
> makes in calculating the z position of a pixel in perspective mode. In
> particular, the calculation across a line in space is not linear -- it is a
> curve. This is now fixed,
> but I needed to make some performance compromises in JavaScript such that
> it is not implemented with isosurfaces or nucleic acid bases. This seems
> reasonable because those typically involve hundreds or thousands of small
> triangles, and this only appears significant with long lines or large
> triangles.
>
> The first bug fix is for Rolf -- recursive function calling was losing
> if/else references. Just a very simple fix. So now Jmol functions are fully
> recursive.
> Example:
>
> maxLevel = 3
>
> function recTest(level, indent) {
> print indent + level + " entry";
> for (var i = level; i < 3; i++) {
> print indent + level + " for i=" + i;
> if (level < maxLevel) {
> print indent + level + " if " + level + " < " + maxLevel + " enter " +
> (level + 1);
> recTest(level + 1, indent + " ");
> } else {
> print indent + level + " else ";
> }
> print indent + level + " continuing for i=" + i;
> }
> print indent + level + " returning";
> }
> recTest(1, "");
>
>
> 1 entry
> 1 for i=1
> 1 if 1 < 3 enter 2
> 2 entry
> 2 for i=2
> 2 if 2 < 3 enter 3
> 3 entry
> 3 returning
> 2 continuing for i=2
> 2 returning
> 1 continuing for i=1
> 1 for i=2
> 1 if 1 < 3 enter 2
> 2 entry
> 2 for i=2
> 2 if 2 < 3 enter 3
> 3 entry
> 3 returning
> 2 continuing for i=2
> 2 returning
> 1 continuing for i=2
> 1 returning
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr <http://www.stolaf.edu/people/hansonr>
>
>
> 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
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users