|
About embedding the Rhino parser
|
| |
Dear list, I'm a Rhino newbie and I have some basic questions. I'm sorry if they have already been answered but I've not been able to find them. I'm currently working on a project where we use Javascript as a programming language. We've build our own homemade parser and interpreters as we interpret the scripts in different ways to perform different use cases of... more »
|
|
Find out how many parameters a function has
|
| |
Is there a way to find out how many parameters are in a JS function? I can get access to the InterpretedFunction object representing the function, but I have no idea how to use it. The source code is vague, and the JavaDoc doesn't even exist! Thanks
|
|
Issue with XML.replace in E4X implementation?
|
| |
Hi, I think there is a bug in the E4X implementation XML.replace function: Rhino 1.7 release 2 2009 03 22 js> <xml><one/><br/><two/><br/><th ree/><br/></xml>.replace('br', '') <xml> <one/> <br/> <two/> <three/> </xml> js> AFAIK the code should remove all the <br/> nodes, but the first one remains. I also tested in FF3.6 and there the <br/> nodes are properly... more »
|
|
Eclipse integration & Classloader
|
| |
Hi all, I am experimenting with a rhino powered JavaScript shell for Eclipse 3.6. It was quite easy to get it running for pure JavaScript code. Now I am facing problems when I try to access Java classes through the LiveConnect feature. Accessing "Packages.something..." works only for Java classes of the JRE... more »
|
|
How to invoke Oracle stored procedure in Javascript code?
|
| |
Hi, I created Oracle stored procedure in OEM(Oracle Enterprise Manager console) in my database, which takes two IN parameters and one OUT parameter as SYS_REFCURSOR and procedure got compiled without errors. In SQL* plus, I have few things to do like, set serveroutput ON variable recordset REFCURSOR;... more »
|
|
How to create a 'real' array that passes 'instanceof Array'
|
| |
Hello, I'm trying to run JSLint using Rhino, but I've encountered a problem that has somewhat stumped me. How can I create a 'real' array from Java? Here's what I've been trying: Context cx = Context.enter(); Scriptable scope = cx.initStandardObjects(); String src = "function f(a) { return a instanceof Array; };";... more »
|
|
javax.script interface to Rhino 10x slower than using Rhino direct?
|
| |
Excuse me if this question has been asked before. I performed a simple benchmark with interpreted and pre-compiled scripts in Rhino, using the Rhino API (1.7R2) and using javax.script (Java SE 6b18), evaluating a simple arithmetic expression "1+1". I was expecting similar performance between the two. I was surprised to... more »
|
|
|