2002/07/15 23:16:42
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:48:54 +0000 (06:48 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:48:54 +0000 (06:48 +0000)
darcs-hash:20040130064854-2ba56-3f50c7783714f5cd70ceef3ac3a602be68cfbb0e.gz

CHANGES
src/org/xwt/SpecialBoxProperty.java

diff --git a/CHANGES b/CHANGES
index f2d0470..3dcf24f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
 15-Jul megacz POSIX.cc: ignore SIGPIPE in case the browser that
               launched us closes
+
+15-Jul megacz SpecialBoxProperty.java: redirect property,
+              color/textcolor error message tweak.
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);
+                }
+            });
     }