Attila Szegedi wrote:
> 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
>
do you have a working example I could play with, please?

As I have tried that line of code and the variable within the java 
object i added, does not get changed and the moethods that should have 
been called where not.

Chris

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

Reply via email to