cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject AW: inner functions and continuations...
Date Thu, 19 Oct 2006 14:05:17 GMT
Hi Jörn,

Even if this might not help you, we use local functions just the way you initially wanted
to without any problems. Maybe it's a bug in the HEAD version?


[ c h r i s t o f e r   d u t z ]

univativ GmbH & Co. KG
Robert-Bosch-Str. 7, 64293 Darmstadt

fon: 0 61 51 / 66 717 - 21
fax: 0 61 51 / 66 717 - 29

Darmstadt, Stuttgart, Karlsruhe, Düsseldorf

-----Ursprüngliche Nachricht-----
Von: Jörn Nettingsmeier [] 
Gesendet: Montag, 16. Oktober 2006 00:01
Betreff: inner functions and continuations...

hi everyone!

i'm trying to add local functions to a flowscript in order to make it 
more maintainable.

the code looks like this:

      function executeUsecase() {

        var someLocalVar;

        function foo() {


the second call to "foo" results in an error ("foo is undefined").
so it appears that those functions are not stored with the continuation. 
is this expected behaviour?

so i changed the function declaration to

        var foo = function() {

it seems to work - the function is still available after the 
continuation. is this the correct approach?

for the record, i'm using cocoon 2.1 (svn HEAD) with sun java 1.5 on 



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message