cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
Subject Re: Blocks, Flow and Dependencies [was RE: Splitting xconf files step 2: the sitemap]
Date Tue, 11 Jan 2005 09:20:31 GMT
> Problem:
> 
> flow.js of blockA
> ------------------
> function blockAFunc() {
>   return helper();
> }
> function helper() {
>   return "A";
> }
> 
> flow.js of blockB
> -----------------
> function blockBFunc() {
>   return helper();
> }
> function helper() {
>    return "B";
> }
> 
> 
> flow.js of blockC
> -----------------
> function blockCFunc() {
>   print(blockB());

You mean:

print(blockBFunc());

> }
> 
> What do you expect when you call blockCFun()? A or B?

Sorry, for the late response

...but clearly: B

> Answer: It depends on the order of declaring your scripts in 
> <map:flow/>. The first helper() method declared will be found.

But there is only one helper() method per block!?

cheers
--
Torsten

Mime
View raw message