2003/06/16 08:03:15
[org.ibex.core.git] / src / org / xwt / Template.java
index 4ac78db..c1a2532 100644 (file)
@@ -212,7 +212,7 @@ public class Template {
         }
 
         for(int i=0; keys != null && i<keys.length; i++) {
-           // FIXME: make sure that if exceptions are thrown in here, the line number of the offending XML is logged
+            // FIXME: make sure that if exceptions are thrown in here, the line number of the offending XML is logged
             if (keys[i] == null) { }
             else if (keys[i].equals("border") || keys[i].equals("image") &&
                      !vals[i].toString().startsWith("http://") && !vals[i].toString().startsWith("https://")) {
@@ -238,18 +238,18 @@ public class Template {
 
         if (callback != null)
             try {
-               JS.Array args = new JS.Array();
-               args.addElement(new Double(numerator));
-               args.addElement(new Double(denominator));
+                JS.Array args = new JS.Array();
+                args.addElement(new Double(numerator));
+                args.addElement(new Double(denominator));
                 callback.call(args);
             } catch (JS.Exn e) {
                 if (Log.on) Log.log(this, "WARNING: uncaught ecmascript exception: " + e);
             }
 
         if (Thread.currentThread() instanceof ThreadMessage) try {
-           XWT.sleep(0);
+            XWT.sleep(0);
         } catch (JS.Exn e) {
-           if (Log.on) Log.log(this, "WARNING: uncaught ecmascript exception: " + e);
+            if (Log.on) Log.log(this, "WARNING: uncaught ecmascript exception: " + e);
         }
     }
 
@@ -284,9 +284,9 @@ public class Template {
 
         if (callback != null)
             try {
-               JS.Array args = new JS.Array();
-               args.addElement(new Double(1.0));
-               args.addElement(new Double(1.0));
+                JS.Array args = new JS.Array();
+                args.addElement(new Double(1.0));
+                args.addElement(new Double(1.0));
                 callback.call(args);
             } catch (JS.Exn ex) {
                 if (Log.on) Log.log(Template.class, "WARNING: uncaught ecmascript exception: " + ex.getMessage());
@@ -296,8 +296,8 @@ public class Template {
     /** template reapplication procedure */
     private static void reapply(Box b) {
 
-       Log.log(Template.class, "Template.reapply() not implemented");
-       /*
+        Log.log(Template.class, "Template.reapply() not implemented");
+        /*
         // Ref 7.5.1: check if we need to retemplatize
         boolean retemplatize = false;
         if (b.templatename != null) {
@@ -351,7 +351,7 @@ public class Template {
 
         // Recurse
         for(Box j = b.getChild(0); j != null; j = j.nextSibling()) reapply(j);
-       */
+        */
     }
 
     /** runs statics, resolves string references to other templates into actual Template instance references, and sets <tt>change</tt> as needed */
@@ -366,15 +366,15 @@ public class Template {
                 JS.CompiledFunction temp = staticscript;
                 staticscript = null;
 
-               // we layer a transparent scope over the Static so that we can catch requests for the xwt object
-               // yet not screw up paths that include a package called xwt (ie xwt.static.org.xwt.foo)
-               JS.Scope varScope = new JS.Scope(s) {
-                       public boolean isTransparent() { return true; }
-                       public Object get(Object key) {
-                           if ("xwt".equals(key)) return XWT.singleton; else return super.get(key);
-                       } };
+                // we layer a transparent scope over the Static so that we can catch requests for the xwt object
+                // yet not screw up paths that include a package called xwt (ie xwt.static.org.xwt.foo)
+                JS.Scope varScope = new JS.Scope(s) {
+                        public boolean isTransparent() { return true; }
+                        public Object get(Object key) {
+                            if ("xwt".equals(key)) return XWT.singleton; else return super.get(key);
+                        } };
 
-               temp.call(new JS.Array(), varScope);
+                temp.call(new JS.Array(), varScope);
             }
         } catch (JS.Exn e) {
             if (Log.on) Log.log(this, "WARNING: uncaught ecmascript exception: " + e.getMessage());