case "Minimized": if (parent == null && getSurface() != null) getSurface().minimized = toBoolean(value); // FEATURE
case "Maximized": if (parent == null && getSurface() != null) getSurface().maximized = toBoolean(value); // FEATURE
case "Close": if (parent == null && getSurface() != null) getSurface().dispose(true);
- case "redirect": if (redirect == this) redirect = (Box)value; else Log.info(this, "redirect can only be set once");
+ case "redirect":
+ for(Box cur = (Box)value; cur != null; cur = cur.parent)
+ if (cur == redirect) {
+ redirect = (Box)value;
+ return;
+ }
+ JS.error("redirect can only be set to a descendant of its current value");
case "font":
if(!(value instanceof Stream)) throw new JSExn("You can only put streams to the font property");
font = value == null ? null : Font.getFont((Stream)value, font == null ? 10 : font.pointsize);
}
}
if (t != null) {
+ stack.pop();
+ stack.push(new CallMarker(this));
+ stack.push(target);
+ JSArray args = new JSArray();
+ args.addElement(val);
f = t.f;
scope = new Trap.TrapScope(f.parentScope, t, val);
pc = -1;
} else {
t = ((JS)o).getTrap(v);
}
-
while (t != null && t.f.numFormalArgs != 0) t = t.next; // get first read trap
- if (t != null) {
- stack.push(new CallMarker(this));
- JSArray args = new JSArray();
- stack.push(args);
- }
}
if (t != null) {
+ stack.push(new CallMarker(this));
+ JSArray args = new JSArray();
+ stack.push(args);
f = t.f;
scope = new Trap.TrapScope(f.parentScope, t, null);
((Trap.TrapScope)scope).cascadeHappened = true;