X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fibex%2Fxt%2Fshell%2FJSRemote.java;h=63562804c77c6574a18ebe5bcff8f228b67a8d7f;hb=a46aed19767ec69719279a354e9f3c68b6d9d9e6;hp=4b3e47584b209c0b128fcd9ba77bbcd6d2c881f4;hpb=7959860be8bb0ac8aa172e1de8bb140b65afdae6;p=org.ibex.xt-crawshaw.git diff --git a/src/java/org/ibex/xt/shell/JSRemote.java b/src/java/org/ibex/xt/shell/JSRemote.java index 4b3e475..6356280 100644 --- a/src/java/org/ibex/xt/shell/JSRemote.java +++ b/src/java/org/ibex/xt/shell/JSRemote.java @@ -11,6 +11,9 @@ import org.ibex.util.Collections; import org.ibex.xt.Prevalence; import org.prevayler.*; +// FIXME: replace Prevayler references with careful Obj.call(Obj o) +// implementation for dynamically changing scopes in rework +// of org.ibex.js. public class JSRemote extends JS { public static final int VERSION = 1; @@ -176,6 +179,7 @@ public class JSRemote extends JS { } int pos = k.lastIndexOf('.'); if (pos >= 0) { + if (path == null) path = ""; path += k.substring(0, pos); k = k.substring(pos + 1); } @@ -196,7 +200,7 @@ public class JSRemote extends JS { if (s.length() > 0 && !s.equals(".")) { Object ob = scope.get(s); if (ob == null || !(ob instanceof JS)) - throw new JSExn("path not found"); + throw new JSExn("path not found "); scope = (JS)ob; } }