On 13 Mai, 16:43, Attila Szegedi <[EMAIL PROTECTED]> wrote:
> The string literal "Hello" is not a java.lang.String, it is a native
> JS String type. On JS native strings, "length" is a property, not a
> method, so "this.title.length" (without method invocation) should work.

No, its neither. The object really has no String methods or props,
neither JS nor Java. Somehow the properties get lost when it travels
the bridge. It looks like a plain 'object'.

BTW: this one actually works (I guess because 's' is stored in a
'real' JS scope, the func invocation scope):

  function myFunc() {
    var s = new java.util.String(this.title);
    if (s.length() > 0) ...
  }

Its somehow special to strings. Since I read that Java Strings are
enriched by Rhino with JS methods, I wonder whether the code which
does it somehow breaks with my Map based scope.

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