Just use ScriptableObject.putProperty() i.e. if your top-level scope (in Java) is a variable "ScripableObject topScope", then
ScriptableObject.putProperty(topScope, "someName", myJavaObject); will make the myJavaObject available under variable name "someName" in your script's top level scope. Attila. On 2008.06.17., at 13:24, chris idr wrote: > I'm trying to add already existing java objects to javascript, with > the > right access name for predifined scripts to run on them. > But I cannot find any examples within the rhino documentation, and > example classes. > > Does any have experience of this? > or if im being dumb please point it out. > > Cheers all > > Chris wade _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
