2002/07/15 23:16:42
[org.ibex.core.git] / src / org / xwt / SpecialBoxProperty.java
index cb64849..f3993cc 100644 (file)
@@ -101,8 +101,8 @@ class SpecialBoxProperty {
                     else if (s.equals("pink")) newcolor = pink;
                     else if (s.equals("yellow")) newcolor = yellow;
                     else if (s.equals("white")) newcolor = white;
-                    else if (Log.on) Log.log(this, "invalid color " + s);
-
+                    else if (Log.on) Log.log(this, "invalid color \"" + s + "\" at " +
+                                             Context.enter().interpreterSourceFile + ":" + Context.enter().interpreterLine);
                     if (newcolor == b.color) return;
                     b.color = newcolor;
                     b.dirty();
@@ -145,7 +145,8 @@ class SpecialBoxProperty {
                     else if (s.equals("pink")) newtextcolor = pink;
                     else if (s.equals("yellow")) newtextcolor = yellow;
                     else if (s.equals("white")) newtextcolor = white;
-                    else if (Log.on) Log.log(this, "invalid textcolor " + s);
+                    else if (Log.on) Log.log(this, "invalid color \"" + s + "\" at " +
+                                             Context.enter().interpreterSourceFile + ":" + Context.enter().interpreterLine);
 
                     if (newtextcolor == b.textcolor) return;
                     b.textcolor = newtextcolor;
@@ -646,6 +647,15 @@ class SpecialBoxProperty {
                     b.set(dmax, 1, stosh(value));
                 }
             });
+
+        specialBoxProperties.put("redirect", new SpecialBoxProperty() {
+                public void put(Box b, Object value) { }
+                public Object get(Box b) {
+                    if (b.redirect == null) return null;
+                    if (b.redirect == b) return Boolean.TRUE;
+                    return get(b.redirect);
+                }
+            });
     }