Re: Creating Java Objects for Rhino at runtime

2009-03-18 Thread Stuart Sierra
On Mar 18, 1:56 am, Sverre Johansen wrote: > The alternative is gen-class, but then I need to first compile and add > the classes to my class path, and for me that doesn't match well with > the way I like to develop using Emacs and Slime. I want to implement > one method at the time and "play aro

Re: Creating Java Objects for Rhino at runtime

2009-03-18 Thread Christian Vest Hansen
You can expose ScriptableObjects that you have called defineProperty[1] on in order to create their interface, no? If I'm not mistaken, creating a method is like defining a property with the value that is a proxy of Function. [1]: http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/Scr