fixed bug 536
authoradam <adam@megacz.com>
Sun, 11 Apr 2004 20:04:09 +0000 (20:04 +0000)
committeradam <adam@megacz.com>
Sun, 11 Apr 2004 20:04:09 +0000 (20:04 +0000)
darcs-hash:20040411200409-5007d-97104e8adb1ee4b5567cc61fd742f3509491e09b.gz

src/org/ibex/Box.java

index 6811f21..c153c8b 100644 (file)
@@ -571,7 +571,7 @@ public final class Box extends JSScope implements Scheduler.Task {
     public void put(Object name, Object value) throws JSExn {
         if (name instanceof Number) { put(toInt(name), value); return; }
         //#switch(name)
-        case "text": CHECKSET_STRING(text); RECONSTRAIN(); DIRTY;
+        case "text": if (value == null) value = ""; CHECKSET_STRING(text); RECONSTRAIN(); DIRTY;
         case "strokecolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); DIRTY;
         case "textcolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); DIRTY;
         case "strokewidth": CHECKSET_SHORT(strokewidth); DIRTY;