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?
Chris [ c h r i s t o f e r d u t z ] IT-Berater univativ GmbH & Co. KG Robert-Bosch-Str. 7, 64293 Darmstadt fon: 0 61 51 / 66 717 - 21 fax: 0 61 51 / 66 717 - 29 email: [EMAIL PROTECTED] http://www.univativ.de Darmstadt, Stuttgart, Karlsruhe, Düsseldorf -----Ursprüngliche Nachricht----- Von: Jörn Nettingsmeier [mailto:[EMAIL PROTECTED] Gesendet: Montag, 16. Oktober 2006 00:01 An: users@cocoon.apache.org 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() { ... } 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]