From: <ha...@us...> - 2011-03-25 13:00:39
|
Revision: 15351 http://jmol.svn.sourceforge.net/jmol/?rev=15351&view=rev Author: hansonr Date: 2011-03-25 13:00:32 +0000 (Fri, 25 Mar 2011) Log Message: ----------- version=12.1.41 # new feature: for (var x in {...}) {...} # -- for example: # for (x in {selected}) { print x } # new feature: x = {*}.mass.sum (and .max, .min, etc.) # -- note, like other atom properties, {*}.mass by itself is an AVERAGE of masses of all atoms # -- accounts for isotopes, but otherwise just uses average masses. Source: John Moore/Jon Holmes, J. Chem. Educ. # new feature: x = plane(<point>, <vector>, true) # bug fix: for(_x...) not disallowed # bug fix: Spartan .smol files: default for charges is now ESPCHARGES (what SpartanStudent reports), not MULLIKEN # -- filter "MULLIKEN" now reads those charges # bug fix: {*}.resno, .atomno, etc. where the property is an integer returns sum, not average # bug fix: closing a prompt dialog with ESCAPE can cause crash; should return "null" # bug fix: conflicting (Edit) selectMenu removed # -- can't have two menus with exactly the same name, or language will only update one # bug fix: miscalculating distances for atom exclusion in CifReader molecular option # bug fix: image creation does not lock out mouse or system refreshes # bug fix: select {*} (color=...) fails (specifically math functions doubling as atom properties) # bug fix: cross-applet script output from print script("show ...", "B") not working # bug fix: synchronize command broken # bug fix: "string"%-n right-side truncation one character short # code: MouseManager14, ActionManager simplifications Modified Paths: -------------- trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2011-03-25 12:59:46 UTC (rev 15350) +++ trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2011-03-25 13:00:32 UTC (rev 15351) @@ -5789,8 +5789,11 @@ isOK = true; if (v == null) v = getContextVariableAsVariable(key); - if (v == null) + if (v == null) { + if (key.startsWith("_")) + error(ERROR_invalidArgument); v = viewer.getOrSetNewVariable(key, false); + } if (v == null || v.tok != Token.bitset || v.intValue == Integer.MAX_VALUE) { if (v == null) { contextVariables.put(key.toLowerCase(), v = ScriptVariable.getVariable(bsIn)); @@ -12862,10 +12865,9 @@ || tv.value instanceof Float || tv.value instanceof Boolean))); if (needVariable) { + if (key.startsWith("_")) + error(ERROR_invalidArgument, key); t = viewer.getOrSetNewVariable(key, true); - if (t == null) { // can't set a variable _xxxx - error(ERROR_invalidArgument); - } isUserVariable = true; } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-03-25 12:59:46 UTC (rev 15350) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-03-25 13:00:32 UTC (rev 15351) @@ -6,13 +6,14 @@ # new feature: for (var x in {...}) {...} # -- for example: # for (x in {selected}) { print x } -# bug fix: Spartan .smol files: default for charges is now ESPCHARGES (what SpartanStudent reports), not MULLIKEN -# -- filter "MULLIKEN" now reads those charges # new feature: x = {*}.mass.sum (and .max, .min, etc.) # -- note, like other atom properties, {*}.mass by itself is an AVERAGE of masses of all atoms # -- accounts for isotopes, but otherwise just uses average masses. Source: John Moore/Jon Holmes, J. Chem. Educ. # new feature: x = plane(<point>, <vector>, true) +# bug fix: for(_x...) not disallowed +# bug fix: Spartan .smol files: default for charges is now ESPCHARGES (what SpartanStudent reports), not MULLIKEN +# -- filter "MULLIKEN" now reads those charges # bug fix: {*}.resno, .atomno, etc. where the property is an integer returns sum, not average # bug fix: closing a prompt dialog with ESCAPE can cause crash; should return "null" # bug fix: conflicting (Edit) selectMenu removed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |