Revision: 18335
          http://sourceforge.net/p/jmol/code/18335
Author:   hansonr
Date:     2013-06-15 13:58:05 +0000 (Sat, 15 Jun 2013)
Log Message:
-----------
___JmolVersion="13.1.17_dev_2013.06.15"

bug fix: JavaScript not returning arrays properly from Jmol.getPropertyXXXX()

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/appletjs/Jmol.java
    trunk/Jmol/src/org/jmol/appletjs/JmolAppletRegistry.java
    trunk/Jmol/src/org/jmol/awtjs2d/Display.java
    trunk/Jmol/src/org/jmol/consolejs/AppletConsole.java
    trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java
    trunk/Jmol/src/org/jmol/util/Escape.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/appletjs/Jmol.java
===================================================================
--- trunk/Jmol/src/org/jmol/appletjs/Jmol.java  2013-06-14 14:11:57 UTC (rev 
18334)
+++ trunk/Jmol/src/org/jmol/appletjs/Jmol.java  2013-06-15 13:58:05 UTC (rev 
18335)
@@ -402,6 +402,7 @@
      * paramInfo || (paramInfo = "");
      * 
      */
+    {}
     return viewer.getProperty(null, infoType, paramInfo);
   }
 
@@ -432,6 +433,7 @@
      * paramInfo || (paramInfo = "");
      * 
      */
+    {}
     return viewer.getProperty("readable", infoType, paramInfo).toString();
   }
 
@@ -462,6 +464,7 @@
      * paramInfo || (paramInfo = "");
      * 
      */
+    {}
     return viewer.getProperty("JSON", infoType, paramInfo).toString();
   }
 
@@ -780,9 +783,7 @@
                 * 
                 *   fxy[i][j] = eval(functionName)(this.htmlName, i, j);
                 */
-               {
-                       
-               }
+               {}
             }
         } else if (nY > 0) { // fill with parsed values from a string (pretty 
fast)
                String data;
@@ -810,9 +811,7 @@
                 *              data = eval(functionName)(htmlName, nX, nY, 
fxy);
                 *           
                 */
-               {
-                       
-               }
+               {}
         }
       } catch (Exception e) {
         Logger.error("Exception " + e + " with nX, nY: " + nX

Modified: trunk/Jmol/src/org/jmol/appletjs/JmolAppletRegistry.java
===================================================================
--- trunk/Jmol/src/org/jmol/appletjs/JmolAppletRegistry.java    2013-06-14 
14:11:57 UTC (rev 18334)
+++ trunk/Jmol/src/org/jmol/appletjs/JmolAppletRegistry.java    2013-06-15 
13:58:05 UTC (rev 18335)
@@ -44,6 +44,7 @@
      * if (Jmol._htRegistry) {J.appletjs.JmolAppletRegistry.htRegistry = 
Jmol._htRegistry} else {Jmol._htRegistry = 
J.appletjs.JmolAppletRegistry.htRegistry};
      * 
      */
+    {}
     cleanRegistry();
     if (name != null) {
       Logger.info("AppletRegistry.checkIn(" + name + ")");

Modified: trunk/Jmol/src/org/jmol/awtjs2d/Display.java
===================================================================
--- trunk/Jmol/src/org/jmol/awtjs2d/Display.java        2013-06-14 14:11:57 UTC 
(rev 18334)
+++ trunk/Jmol/src/org/jmol/awtjs2d/Display.java        2013-06-15 13:58:05 UTC 
(rev 18335)
@@ -26,9 +26,7 @@
      * widthHeight[1] = canvas.height;
      * 
      */
-    {
-      
-    }
+    {}
   }
   
   static boolean hasFocus(Object canvas) {

Modified: trunk/Jmol/src/org/jmol/consolejs/AppletConsole.java
===================================================================
--- trunk/Jmol/src/org/jmol/consolejs/AppletConsole.java        2013-06-14 
14:11:57 UTC (rev 18334)
+++ trunk/Jmol/src/org/jmol/consolejs/AppletConsole.java        2013-06-15 
13:58:05 UTC (rev 18335)
@@ -84,6 +84,7 @@
      *   this.jsConsole.setTitle(this.getLabel("title"));
      * 
      */
+    {}
   }
 
   @Override

Modified: trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2013-06-14 14:11:57 UTC 
(rev 18334)
+++ trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2013-06-15 13:58:05 UTC 
(rev 18335)
@@ -2615,9 +2615,6 @@
               // select @x  where x is "arg", for example
               fixed[j] = T.o(T.bitset, getAtomBitSet(s));
             } else {
-              if (!isExpression) {
-                //print @x
-              }
 
               // bit of a hack here....
               // identifiers cannot have periods; file names can, though

Modified: trunk/Jmol/src/org/jmol/util/Escape.java
===================================================================
--- trunk/Jmol/src/org/jmol/util/Escape.java    2013-06-14 14:11:57 UTC (rev 
18334)
+++ trunk/Jmol/src/org/jmol/util/Escape.java    2013-06-15 13:58:05 UTC (rev 
18335)
@@ -116,6 +116,11 @@
   // where it should not make any difference
   public static boolean isAS(Object x) {
     /**
+     * 
+     * look also for array with first null element
+     * so untypable -- just call it a String[]
+     * (group3Lists, created in ModelLoader)
+     * 
      * @j2sNative
      *  return Clazz.isAS(x);
      */
@@ -149,7 +154,9 @@
      * @j2sNative
      *  return Clazz.isAF(x);
      */
+    {
     return x instanceof float[];
+    }
   }
 
 
@@ -158,14 +165,18 @@
      * @j2sNative
      *  return Clazz.isAFloat(x);
      */
+    {
     return x instanceof Float[];
+    }
   }
   public static boolean isAV(Object x) {
     /**
      * @j2sNative
      *  return Clazz.instanceOf(x[0], org.jmol.script.SV);
      */
+    {
     return x instanceof SV[];
+    }
   }
 
   public static boolean isAD(Object x) {
@@ -173,7 +184,9 @@
      * @j2sNative
      *  return Clazz.isAF(x);
      */
+    {
     return x instanceof double[];
+    }
   }
 
   public static boolean isAB(Object x) {
@@ -181,7 +194,9 @@
      * @j2sNative
      *  return Clazz.isAI(x);
      */
+    {
     return x instanceof byte[];
+    }
   }
   
 //  public static boolean isASh(Object x) {
@@ -189,7 +204,9 @@
 //     * @j2sNative
 //     *  return Clazz.isAI(x);
 //     */
+//     {
 //    return x instanceof short[];
+//     }
 //  }
   
   public static boolean isAI(Object x) {
@@ -197,7 +214,9 @@
      * @j2sNative
      *  return Clazz.isAI(x);
      */
+    {
     return x instanceof int[];
+    }
   }
 
   public static boolean isAII(Object x) {
@@ -623,6 +642,13 @@
   }
 
   private static String fixString(String s) {
+    /**
+     * @j2sNative
+     * 
+     * if (typeof s == "undefined") return "null"
+     * 
+     */
+    {}
     if (s == null || s.indexOf("{\"") == 0) //don't doubly fix JSON strings 
when retrieving status
       return s;
     s = TextFormat.simpleReplace(s, "\"", "''");

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-06-14 14:11:57 UTC 
(rev 18334)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-06-15 13:58:05 UTC 
(rev 18335)
@@ -9,8 +9,10 @@
 #  The quotes above look odd for a parameter file, but they are 
 #  important for the JavaScript version of Jmol.
 
-___JmolVersion="13.1.17_dev_2013.06.14"
+___JmolVersion="13.1.17_dev_2013.06.15"
 
+bug fix: JavaScript not returning arrays properly from Jmol.getPropertyXXXX()
+  -- very important to have {} after j2sNative directive!
 bug fix: COMPARE could rotate to less-good fit with SMARTS search
 bug fix: draw ARROW ATOM/BOND broken
 

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


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to