Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion rhino + envjs into a java application that uses highcharts
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
胡凯  
View profile  
 More options Feb 14 2011, 5:15 pm
From: 胡凯 <iamka...@gmail.com>
Date: Tue, 15 Feb 2011 09:15:20 +1100
Local: Mon, Feb 14 2011 5:15 pm
Subject: Re: [env-js] Re: rhino + envjs into a java application that uses highcharts

let me work on it tonight and send you the code later.

On Tue, Feb 15, 2011 at 12:32 AM, chris thatcher <

thatcher.christop...@gmail.com> wrote:
> Hi Hu, Can you give me some more details about what you mean by 'the
> generated html are broken'? Thanks.
> Thatcher

> On Sun, Feb 13, 2011 at 6:07 PM, Hu Kai <iamka...@gmail.com> wrote:

>> did you get any good luck of generating the svg you want?

>> I did something similar few days before., however the html it
>> generated are broken.

>> On Jan 13, 7:04 pm, cristi <cristi.cior...@gmail.com> wrote:
>> > Hello,

>> > I have managed to solve the problem of making available to rhino
>> > functions like as described in here:

>> > http://www.devcomments.com/Embedding-EnvJs-how-to-get-the-Rhino-Shell.
>> ..

>> > The solution is:

>> > Global global = new Global();
>> > global.init(cx);

>> > On Jan 11, 3:49 pm, cristi <cristi.cior...@gmail.com> wrote:

>> > > Hello,

>> > > I have a Java application in which I want to use rhino to execute some
>> > > highcharts code. The highcharts library depends on the document
>> > > object,  therefore I need envjs. I have tried to embed envjs using the
>> > > guidelines from the site and whatever advice I could find on the
>> > > internet and ended up with the following code:

>> > > cx.setOptimizationLevel(-1);//bypass the 64k limit
>> > > Global global = Main.getGlobal();
>> > > global.init(cx);
>> > > Main.processSource(cx, "FopTest/src/main/resources/env.rhino.1.2.js");
>> > > cx.evaluateReader(scope,
>> > >                     new

>> InputStreamReader(RhinoTest.class.getResourceAsStream("highcharts.js")),
>> > >                     "highcharts.js", 0, null);

>> > > for which I received the following output in the console:
>> > > [  Envjs/1.6 (Rhino; U; Linux i386 2.6.35-24-generic; en-US; rv:
>> > > 1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
>> > > org.mozilla.javascript.EcmaError: ReferenceError: "document" is not
>> > > defined. (highcharts.js#50)
>> > > which I suppose shows that the file was loaded, but it is not
>> > > available for highcharts.

>> > > Then, I tried like this:

>> > >  cx.setOptimizationLevel(-1);
>> > >  cx.evaluateReader(scope, new
>> > > InputStreamReader(RhinoTest.class.getResourceAsStream("env.rhino.
>> > > 1.2.js")), "env.rhino.1.2.js", 0, null);
>> > >  cx.evaluateReader(scope,
>> > >                     new

>> InputStreamReader(RhinoTest.class.getResourceAsStream("highcharts.js")),
>> > >                     "highcharts.js", 0, null);

>> > > but I got the following error: org.mozilla.javascript.EcmaError:
>> > > ReferenceError: "print" is not defined. (env.rhino.1.2.js#1294)

>> > > I am using rhino 1.7R2 and env.rhino.1.2.js(Envjs core-env.1.2.13).
>> > > Can you point me into the right direction as to how can I make the
>> > > env.rhino.js code available to the high charts code?

>> > > Thanks,
>> > > Cristi

>> --
>> You received this message because you are subscribed to the Google Groups
>> "Env.js" group.
>> To post to this group, send email to envjs@googlegroups.com.
>> To unsubscribe from this group, send email to
>> envjs+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/envjs?hl=en.

> --
> Christopher Thatcher

>  --
> You received this message because you are subscribed to the Google Groups
> "Env.js" group.
> To post to this group, send email to envjs@googlegroups.com.
> To unsubscribe from this group, send email to
> envjs+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/envjs?hl=en.

--
All Infomation: http://iamhukai.info
Twitter:  http://twitter.com/iamhukai
Blog:  http://iamhukai.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.