On Tue, Jan 19, 2010 at 4:05 PM, Daryl Stultz <[email protected]> wrote:

> Hello,
>
> I'm currently inserting text like this before compiling my script:
>
> "Bar = Packages." + foo.Bar.class.getName() + ";\n" + theScriptToRun
>
> as a way to "alias" the Bar class. I'd prefer not to do it this way.
>
>
This is it:

ScriptableObject.putProperty(scope, "Bar", new NativeJavaClass(scope,
foo.Bar.class));

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:[email protected]
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to