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() {
         ...
       }

       foo();
       sendPageAndWait("/some/pipeline");
       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 linux/x86_64.


regards,

jörn




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to