It's easiest just to use straight Java beans, and Rhino will call the
getter/setter on property access. For example,

js> f = new java.io.File("foo.txt")
foo.txt
js> f.directory
false
js> f.name
foo.txt

f.directory calls f.isDirectory(), and f.name calls f.getName().
Setters work similarly.

--N

FoxZ wrote:
> Please send me an exemple for hook new/getter/setter from java.
>
> var x=new myscriptableobject();
> var y=new x.mywrapperobject(); // <---
>
> while(y.again){} // <--- I dont understand how hook getter/setter to
> java
>
> Thanks.
>
> (i write wrapper for jdbc (odbc:msaccess) with self field define)
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to