On 13 Mai, 17:54, helge <[EMAIL PROTECTED]> wrote:
> I could isolate it a bit. My Scriptable.get() implementation was doing
> the same like setJavaPrimitiveWrap(false), that is, return String,
> Number and Boolean as-is (the docs of Scriptable.get() suggest that
> this is OK).
> When I wrap the String in a JavaNativeObject, it comes along OK
> (though I would prefer getting a real JS String).
>
> So I guess the question is: when I return a java.lang.String from
> Scriptable.get(), how can it happen that it comes out w/o methods/
> properties? :-)
> Is java.lang.String not the same like a JS String on the JavaScript
> side? (after mapping)
>
> I'll have another look.

OK, here we go. There is a org.mozilla.javascript.NativeString(),
which is not declared public, hence not available to code outside the
Rhino package. I guess when I return java.lang.String from get(), it
gets neither embedded in NativeString nor in JavaNativeObject, hence
it has no methods.

Hm, not sure what to do now. Should NativeString() be a public class?

Thanks,
  Helge
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to