From: megacz Date: Fri, 30 Jan 2004 07:42:58 +0000 (+0000) Subject: 2003/12/16 23:01:41 X-Git-Tag: RC3~262 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=66088da8711e9855d6328732bbcce8788301a8bc 2003/12/16 23:01:41 darcs-hash:20040130074258-2ba56-16e11c53aef310e6ee8b46a129e3db68e465a849.gz --- diff --git a/src/org/xwt/Box.java b/src/org/xwt/Box.java index 07c0066..8287e45 100644 --- a/src/org/xwt/Box.java +++ b/src/org/xwt/Box.java @@ -57,6 +57,8 @@ public final class Box extends JSScope implements Scheduler.Task { //#define CHECKSET_BOOLEAN(prop) boolean nu = toBoolean(value); if (nu == prop) break; prop = nu; //#define CHECKSET_STRING(prop) if ((value==null&&prop==null)||(value!=null&&value.equals(prop))) break; prop=(String)value; + void mark_for_repack() { MARK_REPACK; } + protected Box() { super(null); } static Hash boxToCursor = new Hash(500, 3); @@ -74,7 +76,7 @@ public final class Box extends JSScope implements Scheduler.Task { static final String[] props = new String[] { "fill", "stroke", "image", "tile", "fixedaspect", "text", "path", "font", "shrink", "hshrink", "vshrink", "x", "y", "width", "height", "cols", "rows", - "colspan", "rowspan", "align", "invisible", "absolute", "globalx", "globaly", + "colspan", "rowspan", "align", "visible", "absolute", "globalx", "globaly", "minwidth", "maxwidth", "minheight", "maxheight", "numchildren", "redirect", "cursor", "mousex", "mousey", "xwt", "static", "mouseinside", "root", "thisbox", "indexof" diff --git a/src/org/xwt/HTTP.java b/src/org/xwt/HTTP.java index 8d7ffda..de013f0 100644 --- a/src/org/xwt/HTTP.java +++ b/src/org/xwt/HTTP.java @@ -782,7 +782,7 @@ public class HTTP { public void perform() throws Exception { Box b = new Box(); Template t = Template.getTemplate((Res)Main.builtin.get("org/xwt/builtin/proxy_authorization.xwt")); - t.apply(b, null, null); + t.apply(b, null); b.put("realm", realm); b.put("proxyIP", proxyIP); } diff --git a/src/org/xwt/Template.java b/src/org/xwt/Template.java index b11cf7c..1d39655 100644 --- a/src/org/xwt/Template.java +++ b/src/org/xwt/Template.java @@ -106,8 +106,20 @@ public class Template { * @param pboxes a vector of all box parents on which to put $-references * @param ptemplates a vector of the fileNames to recieve private references on the pboxes */ - void apply(Box b, XWT xwt) throws JSExn { apply(b, xwt, null); } - void apply(Box b, XWT xwt, PerInstantiationJSScope parentPis) throws JSExn { + void apply(Box b, XWT xwt) { + try { + apply(b, xwt, null); + } catch (JSExn e) { + b.clear(b.VISIBLE); + b.mark_for_repack(); + Log.log(Template.class, "WARNING: exception (below) thrown during application of template;"); + Log.log(Template.class, " setting visibility of target box to \"false\""); + Log.logJS(e); + } + } + + + private void apply(Box b, XWT xwt, PerInstantiationJSScope parentPis) throws JSExn { getStatic();