To continue talking to myself (I hope the archives might help someone
else ;-), it seems its a scoping issue. Maybe JS does not find the JS
String.prototype?
This is what I use, where 'locScope' is my subclass of
JavaNativeObject.
jr = ((Function)jv).call(cx,
locScope /* scope (where to start variable lookup) */,
locScope /* this (just the binding of 'this') */,
args);
Using the Java object as the 'scope' has given me issues in the past.
Maybe JavaNativeObject doesn't work well as a non-leaf in a scope/
prototype chain? I checked in the debugger and 'parent' is null, while
'prototype' points to an initialized ImporterTopLevel (which should
have called initStandardObjects()), which sounds right.
Helge
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino