Re: Rhino global.load() in script context

2010-08-24 Thread Peter Reilly
That is pretty awesome!. Peter On Tue, Aug 24, 2010 at 1:53 AM, Jacob Beard wrote: > And here is what it looks like now: > > https://svn.apache.org/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml > > Most interesting parts are target run-unit-tests-with-rhino target and macro > run-

Re: Rhino global.load() in script context

2010-08-23 Thread Jacob Beard
And here is what it looks like now: https://svn.apache.org/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml Most interesting parts are target run-unit-tests-with-rhino target and macro run-unit-tests-with-selenium-macro. I'm pretty happy with this result, as it has allowed me to in

Re: Rhino global.load() in script context

2010-08-23 Thread Greg Roodt
No problem. I had fun discovering how to make it work. I like the macro idea btw. Cheers Greg On 22 Aug 2010 14:03, "Jacob Beard" wrote: > Hi Greg, > > I'll bring it up on the developer's list. > > I've created a macro that sets up the rhino environment, so right now > this seems like a good eno

Re: Rhino global.load() in script context

2010-08-22 Thread Jacob Beard
Hi Greg, I'll bring it up on the developer's list. I've created a macro that sets up the rhino environment, so right now this seems like a good enough solution for me:

Re: Rhino global.load() in script context

2010-08-22 Thread Greg Roodt
Hi Glad it worked. I agree with you. I think it would be much easier and more useful if these functions from the Rhino shell were made available. It is not something that the task is going out of its way to remove though, the problem is actually Rhino/javascript itself (not a problem, more a str

Re: Rhino global.load() in script context

2010-08-21 Thread Jacob Beard
Hi Greg, Thanks a lot for this! This does exactly what I want. I had actually just about given up, as I realized that the load function I was attempting to define would have the shortcoming of essentially capturing any local variables eval'ed within it. This mean that while dojo worked becaus

Re: Rhino global.load() in script context

2010-08-21 Thread Greg Roodt
This might work for you:

Re: Rhino global.load() in script context

2010-08-21 Thread Jacob Beard
Hi Greg, Thanks for your response. Replies below: On 10-08-21 01:41 PM, Greg Roodt wrote: I believe load() is part of Rhino Shell. I think all that the task runs when using JavaScript is the interpreter. It would only have the pure Javascript standard language features (and a few bits and piece

Re: Rhino global.load() in script context

2010-08-21 Thread Greg Roodt
I believe load() is part of Rhino Shell. I think all that the task runs when using JavaScript is the interpreter. It would only have the pure Javascript standard language features (and a few bits and pieces to interact with Java and the execution context). It might be easier to run the shell for

Rhino global.load() in script context

2010-08-21 Thread Jacob Beard
Hi, My Ant script currently generates JavaScript modules, and I also have JavaScript modules for unit testing the generated JavaScript. What I'd like to do is use a Rhino script element to load the generated JavaScript and the unit test modules, and run one on the other. In order to do this,