partial update of core for new js stuff
[org.ibex.core.git] / src / org / ibex / core / Template.java
index 249ba11..c2a7c2c 100644 (file)
@@ -88,16 +88,16 @@ public class Template {
         for(int i=0; i<urikeys.length; i++) {
             if (urikeys[i] == null) continue;
             // FEATURE: Cache urikeys and resolved resources
         for(int i=0; i<urikeys.length; i++) {
             if (urikeys[i] == null) continue;
             // FEATURE: Cache urikeys and resolved resources
-            //pis.declare(JS.S(urikeys[i]));
+            //pis.declare(JSU.S(urikeys[i]));
             // JS:FIXME: ugly
             // JS:FIXME: ugly
-            pis.sput(JS.S(urikeys[i]), ibex.resolveString(urivals[i], true));
+            pis.sput(JSU.S(urikeys[i]), ibex.resolveString(urivals[i], true));
         }
 
         // FIXME needs to obey the new application-ordering rules
         for (int i=0; children != null && i<children.size(); i++) {
             Box kid = new Box();
             ((Template)children.elementAt(i)).apply(kid, pis);
         }
 
         // FIXME needs to obey the new application-ordering rules
         for (int i=0; children != null && i<children.size(); i++) {
             Box kid = new Box();
             ((Template)children.elementAt(i)).apply(kid, pis);
-            b.putAndTriggerTraps(b.get(JS.S("numchildren")), kid);
+            b.putAndTriggerTraps(b.get(JSU.S("numchildren")), kid);
         }
 
         if (script != null) JS.cloneWithNewGlobalScope(script, pis).call(null, null, null, null, 0);
         }
 
         if (script != null) JS.cloneWithNewGlobalScope(script, pis).call(null, null, null, null, 0);
@@ -265,11 +265,11 @@ public class Template {
             // convert attributes to appropriate types and intern strings
             for(int i=0; i<t.keys.length; i++) {
                 // FEATURE: Intern
             // convert attributes to appropriate types and intern strings
             for(int i=0; i<t.keys.length; i++) {
                 // FEATURE: Intern
-                t.keys[i] = JS.S((String)keys.elementAt(i));
+                t.keys[i] = JSU.S((String)keys.elementAt(i));
                 String valString = (String) vals.elementAt(i);
                 
                 String valString = (String) vals.elementAt(i);
                 
-                if (valString.equals("true")) t.vals[i] = JS.T;
-                else if (valString.equals("false")) t.vals[i] = JS.F;
+                if (valString.equals("true")) t.vals[i] = JSU.T;
+                else if (valString.equals("false")) t.vals[i] = JSU.F;
                 else if (valString.equals("null")) t.vals[i] = null;
                 else {
                     boolean hasNonNumeral = false;
                 else if (valString.equals("null")) t.vals[i] = null;
                 else {
                     boolean hasNonNumeral = false;
@@ -282,8 +282,8 @@ public class Template {
                             hasNonNumeral = true;
                             break;
                         }
                             hasNonNumeral = true;
                             break;
                         }
-                    if (valString.length() > 0 && !hasNonNumeral) t.vals[i] = JS.N(Double.parseDouble((valString)));
-                    else t.vals[i] = JS.S(valString.intern()); // FEATURE: JS.intern() ?
+                    if (valString.length() > 0 && !hasNonNumeral) t.vals[i] = JSU.N(Double.parseDouble((valString)));
+                    else t.vals[i] = JSU.S(valString.intern()); // FEATURE: JS.intern() ?
                 }
             }
         }
                 }
             }
         }
@@ -337,7 +337,7 @@ public class Template {
         JS box;
         void putDollar(String key, Box target) throws JSExn {
             if (parentBoxPis != null) parentBoxPis.putDollar(key, target);
         JS box;
         void putDollar(String key, Box target) throws JSExn {
             if (parentBoxPis != null) parentBoxPis.putDollar(key, target);
-            JS jskey = JS.S("$" + key);
+            JS jskey = JSU.S("$" + key);
             //declare(jskey);
             sput(jskey, target);
         }
             //declare(jskey);
             sput(jskey, target);
         }