Scripted Attribute
Peter Schober
peter.schober at univie.ac.at
Sat Jul 30 05:49:58 EDT 2016
* Cantor, Scott <cantor.2 at osu.edu> [2016-07-25 15:37]:
> > With v2 I used something like this to run/test rhino scripts on the
> > command line, outside the IDP:
> >
> > $ java -cp "/usr/share/java/*:~/path/to/idp4/jars/*"
> > org.mozilla.javascript.tools.shell.Main -w -strict -f ~/resolver.js
> >
> > I haven't yet looked at IDPv3 and Nashorn in any detail other than
> > getting my scripts to work in the IDP.
>
> What would that test? Just check error handling more or less?
Not sure I understand. I'd use it to catch (js) coding errors, (java)
type errors, checking for the right classes, with the right methods,
etc. Of course I had to (conditionally) define attributes the code
depends on in ja code locally to simulte them being [not] available in
the resolver.
I originally had planned to use jython scripting (instead of
ecmascript) but I never got far enough with using ipython (to
dynamically and easily explore the java class hierarchy and
autocompelte methods etc all on the console) under jython to make this
work/fun. Ipython might have grown better jython support meanwhile,
though. That was all many years ago.
-peter
More information about the users
mailing list