cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rice Yeh" <rice...@gmail.com>
Subject Re: call a function not in global object in <map:call >
Date Sun, 14 Jan 2007 03:53:46 GMT
I am sure my code is from trunk. It is at version revision 494774. Please
have a look at
https://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
.
Is the code you add in it?

Rice

On 1/14/07, Mark Lundquist <ml@wrinkledog.com> wrote:
>
>
> On Jan 13, 2007, at 11:11 AM, Rice Yeh wrote:
>
> > The fun is not gotten by the code at line 591 in
> > FOM_JavaScriptInterpreter.java
> > Object fun = ScriptableObject.getProperty(thrScope, funName);
>
> hold on, I did not read the above very carefully the first time,
> sorry... :-/
>
> > By studying the source code, I do not think "call a function not in
> > global object in <map:call >" is supported in trunk
>
> OK, the code you excerpted above is not from trunk HEAD (or
> BRANCH_2_1_X HEAD either.  What version are you looking at there,
> anyway?  The current versions have my change, which looks like this:
>
>                      // Resolve function name
>                      //
>                      Object fun;
>                      try {
>                          fun = context.compileString (funName, null, 1,
> null)
>                                           .exec (context, thrScope);
>                      } catch (EcmaError ee) {
>                         throw new ResourceNotFoundException (
>                              "Function \"javascript:" + funName + "()\"
> not found"
>                          );
>                      }
>
> HTH,
> —ml—
>
>
>

Mime
View raw message