/** a trivial private class to serve as the box.indexof function object */
private class IndexOf extends JS.Function {
/** a trivial private class to serve as the box.indexof function object */
private class IndexOf extends JS.Function {
public Object _call(JS.Array args) throws JS.Exn {
if (args.length() != 1 || args.elementAt(0) == null || !(args.elementAt(0) instanceof Box)) return new Integer(-1);
Box b = (Box)args.elementAt(0);
public Object _call(JS.Array args) throws JS.Exn {
if (args.length() != 1 || args.elementAt(0) == null || !(args.elementAt(0) instanceof Box)) return new Integer(-1);
Box b = (Box)args.elementAt(0);
- if (Log.on) Log.log(this, "attempt to put a non-function value to " + name + " at " + JS.getFileAndLine());
+ if (Log.on) Log.log(this, "attempt to put a non-function value (" + value + ") to " +
+ name + " at " + JS.getFileAndLine());
} else if (name.charAt(1) == '_') {
name = name.substring(2).intern();
Trap t = Trap.getTrap(this, name);
} else if (name.charAt(1) == '_') {
name = name.substring(2).intern();
Trap t = Trap.getTrap(this, name);