Hello,

I'm familiar with this:

ScriptableObject.defineClass(scope, long.path.name.MyEntity.class);

which puts MyEntity at the top level, perhaps with a name "Entity". MyEntity
must be Scriptable. I'd like to do the same with classes that aren't
scriptable. Currently I stick code at the front like so:

String imports = "Entity = Packages." +
long.path.name.MyEntity.class.getName() + ";\n";
String fullScript = import + originalScript;
executeScript(fullScript);

Kinda gross. I think I'd like to do something like this:

ScriptableObject.putProperty(scope, "Entity", yaddayadda);

but I don't know what to put in for yaddayadda to reference the class.
Anyone know?

Thanks.

--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