From:  "Mike" <Mail.Micke@gmail.com>
Date:  14 Jul 2006 23:06:06 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.jseng
Subject:  

Re: Load global functions from js file for later use in evaluateString calls

NNTP-Posting-Host:  193.62.199.144

Hi,
thanks for the reply.

I have had a look at compiling some code to the Function class, but I
wan't to do it the other way around, by having java code in a String
calling a custom js function. If I am not mistaken that isn't possible
with the Function object is it?

Noticed that this group was dead, and sent a copy of the original
message to the dev newsgroup.

Cheers
 Mike

Meandron wrote:
> Hi Mike,
>
> I don't know if it works (as I never tried it myself), but perhaps you
> could use compileFunction(see API for params), which is a method of
> Context objects and returns a Function object.
>
> Using that Function object you then can call call(again see API for
> params).
> It's possible to set parameters to the function you want to call.
>
> Hope, this is useful to you!
>
> Greetings,
> Matthias
>
> P.S. The Rhino- newsgroup switched to mozilla.dev.tech.js-engine. In
> order to get your postings read, you should think about a switch, too
> :-).