Revision: 20376
          http://sourceforge.net/p/jmol/code/20376
Author:   hansonr
Date:     2015-03-10 17:45:17 +0000 (Tue, 10 Mar 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.3.13_2015.03.10"

new feature: print  command by itself clears JavaScript and Jmol consoles

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/console/GenericConsole.java
    trunk/Jmol/src/org/jmol/script/ScriptEval.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties
    trunk/Jmol/src/org/jmol/viewer/Viewer.java
    trunk/Jmol/src/org/openscience/jmol/app/jmolpanel/console/AppConsole.java

Modified: trunk/Jmol/src/org/jmol/console/GenericConsole.java
===================================================================
--- trunk/Jmol/src/org/jmol/console/GenericConsole.java 2015-03-09 19:40:49 UTC 
(rev 20375)
+++ trunk/Jmol/src/org/jmol/console/GenericConsole.java 2015-03-10 17:45:17 UTC 
(rev 20376)
@@ -362,12 +362,20 @@
       updateLabels();
       outputMsg(null);
       strEcho = defaultMessage;
+    } else if (strEcho.equals("\0")) {
+      /**
+       * @j2sNative
+       * 
+       * Clazz.Console.clear();
+       */
+      {}
+      strEcho = null;
     }
     outputMsg(strEcho);
   }
 
   private void outputMsg(String message) {
-    if (message == null || message.length() == 0) {
+    if (message == null) {
       output.setText("");
       return;
     }

Modified: trunk/Jmol/src/org/jmol/script/ScriptEval.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/ScriptEval.java      2015-03-09 19:40:49 UTC 
(rev 20375)
+++ trunk/Jmol/src/org/jmol/script/ScriptEval.java      2015-03-10 17:45:17 UTC 
(rev 20376)
@@ -5543,8 +5543,11 @@
   }
 
   private void cmdPrint() throws ScriptException {
-    if (slen == 1)
-      bad();
+    if (slen == 1) {
+      if (!chk)
+        showStringPrint("\0", true);
+      return;
+    }
     showStringPrint(parameterExpressionString(1, 0), true);
   }
   

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-03-09 19:40:49 UTC 
(rev 20375)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-03-10 17:45:17 UTC 
(rev 20376)
@@ -14,8 +14,10 @@
 
 TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT 
command for problems)
 
-Jmol.___JmolVersion="14.3.13_2015.03.09"
+Jmol.___JmolVersion="14.3.13_2015.03.10"
 
+new feature: print  command by itself clears JavaScript and Jmol consoles
+
 new feature: color polyhedra red blue (edge color blue)
 
 bug fix: show state/xxxx does not work

Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Viewer.java  2015-03-09 19:40:49 UTC (rev 
20375)
+++ trunk/Jmol/src/org/jmol/viewer/Viewer.java  2015-03-10 17:45:17 UTC (rev 
20376)
@@ -6502,7 +6502,7 @@
   }
 
   public void showString(String str, boolean isPrint) {
-    if (!isJS && isScriptQueued() && (!isSilent || isPrint)) {
+    if (!isJS && isScriptQueued() && (!isSilent || isPrint) && 
!"\0".equals(str)) {
       Logger.warn(str); // warn here because we still want to be be able to 
turn this off
     }
     scriptEcho(str);

Modified: 
trunk/Jmol/src/org/openscience/jmol/app/jmolpanel/console/AppConsole.java
===================================================================
--- trunk/Jmol/src/org/openscience/jmol/app/jmolpanel/console/AppConsole.java   
2015-03-09 19:40:49 UTC (rev 20375)
+++ trunk/Jmol/src/org/openscience/jmol/app/jmolpanel/console/AppConsole.java   
2015-03-10 17:45:17 UTC (rev 20376)
@@ -133,6 +133,8 @@
   public void sendConsoleEcho(String strEcho) {
     if (strEcho == null)  // new language
       updateLabels();
+    else if (strEcho.equals("\0"))
+      sendConsoleMessage(null);
     else
       console.outputEcho(strEcho);
     setError(false);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to