Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 39791 invoked from network); 11 Jan 2005 09:36:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Jan 2005 09:36:12 -0000 Received: (qmail 82776 invoked by uid 500); 11 Jan 2005 09:36:09 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 82717 invoked by uid 500); 11 Jan 2005 09:36:09 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 82703 invoked by uid 99); 11 Jan 2005 09:36:08 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from viefep12-int.chello.at (HELO viefep20-int.chello.at) (213.46.255.25) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 11 Jan 2005 01:36:07 -0800 Received: from [192.168.1.31] (really [62.178.239.20]) by viefep20-int.chello.at (InterMail vM.6.01.03.04 201-2131-111-106-20040729) with ESMTP id <20050111093604.YKIG23052.viefep20-int.chello.at@[192.168.1.31]> for ; Tue, 11 Jan 2005 10:36:04 +0100 Message-ID: <41E39DFF.4010707@apache.org> Date: Tue, 11 Jan 2005 10:35:59 +0100 From: Reinhard Poetz User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Blocks, Flow and Dependencies [was RE: Splitting xconf files step 2: the sitemap] References: <41E22BCB.9010502@apache.org> <41E24FCF.109@nada.kth.se> <942AA128-6307-11D9-A9E3-000393B3DE96@hard-bop.com> <41E281FE.1040706@apache.org> <6D0D565F-6317-11D9-A9E3-000393B3DE96@hard-bop.com> <41E29A3A.9050903@apache.org> <8DFA484A-631C-11D9-A9E3-000393B3DE96@hard-bop.com> <41E2A21F.5080106@apache.org> <41E39A5F.70906@apache.org> In-Reply-To: <41E39A5F.70906@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Torsten Curdt wrote: >> 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()); sorry, yes >> } >> >> What do you expect when you call blockCFun()? A or B? > > > Sorry, for the late response > > ...but clearly: B that's the goal. But with imports in you will get into trouble: In this case print(blockBFunc()); will return "A". > >> Answer: It depends on the order of declaring your scripts in >> . The first helper() method declared will be found. > > > But there is only one helper() method per block!? Yes. Therefore we need something more sohpisticated than imports. -- Reinhard