Hi all,
I have a Java class 'Procedure' derived from ScriptableObject that has
a public enum Result {OK, ERROR}. How can I make the enum values
available to a script?
As an example, say there is a method Procedure.setResult( Result r ),
which I want to call from the script with an OK value.
I found that with a given Procedure object proc I can do:
proc.setResult( Packages.my.namespace.Procedure.Result.OK );
but I find this clumsy.
What would I have to do to be able to call
proc.setResult( OK ) or at least proc.setResult( Result.OK )
without any further import or such in the script? What I am actually
looking for is a Java method on ScriptableObject that makes the const
enum values visible and usable in the script, just similar to
defineProperty().
Thanks for any suggestions,
Wernke
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino