extra comments
[org.ibex.xt-crawshaw.git] / src / java / org / ibex / xt / shell / JSRemote.java
index 4b3e475..6356280 100644 (file)
@@ -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;
                         }
                     }