Christopher, thanks for the explanation: what you describe is exactly what I'm seeing. However, whether this is the desired behaviour, I'm not sure. If I want the flow script to handle the browser back button transparently, I'd expect my script state to be restored exactly the way it was when that page was originally submitted, including the stack which includes the local variables. This is also how it is described in the flow script documentation btw. The net result of the way it behaves now is that when I go back to an earlier page, the script doesn't behave as it should since its local variables are not correctly restored.
Regards, Francis -----Original Message----- From: Christopher Oliver [mailto:[EMAIL PROTECTED] Sent: Friday, September 26, 2003 5:45 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Flowscript problem? Reinhard, Try your calculator example again: This time enter values for both "a" and "b". Then clone the window, hit the back button and enter a new value for "b". Return to the first window and submit it. You should see the new value of "b" you set in the second window. This is the expected behavior. I believe the reason your example did not work is that the page where you submit "a" does not involve an existing continuation (it calls the top-level "calculator" function). Regards, Chris Reinhard Poetz wrote: >Chris, > > > >>From: Christopher Oliver >> >>Local variables are _shared_ between continuations. Changes >>to the value >>of the variable in one continuation should be visible to another. If >>that is not the case, there's a bug. >> >> > >Try the calculator example as desribed below. But I'm not sure if this >is a bug. IIRC this is not the first time we discuss this but I only >found one pointer: >http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105593054122167&w=2 >Does anybody find more on this subject? > >Reinhard > >P.S.: Moving again a discussion to the dev list > > > >>Chris >> >>Reinhard Poetz wrote: >> >> >> >>>>From: Francis Vermeulen >>>> >>>>thanks for the reply. But as I understood it, for a single >>>>script there may be multiple continuations at any point in >>>>time, all corresponding to different page submissions so that >>>>if you use the browser back button, submitting that page can >>>>use that particular continuation to restore the intepreter >>>>state as it was when that page was being submitted the first >>>>time. >>>> >>>> >>>> >>>> >>>sorry, my last answer was too fast: you are right, local >>> >>> >>variables are >> >> >>>bound to the continuation. I tried it with the calculator example by >>>changing all variables to local variables. I entered a and b >>> >>> >>and then >> >> >>>forked my browser window (using IE with Ctrl+N) and jumped back to >>>enter a different value for b. If I used local variables I got two >>>different results which is the right behaviour. I tested with a CVS >>>snapshot from last week (with the latest rhino lib). >>> >>> >>> >>> >>> >>>>That's even the example given in the documentation? So >>>>I don't understand your point, I'm sorry. Can you clarify >>>>further on this? >>>> >>>> >>>> >>>> >>>Sorry again. >>> >>>Try out the calculator examples the way I did. Do you get the same >>>results as I got? >>> >>>Cheers, >>>Reinhard >>> >>> > > > > --------------------------------------------------------------------- 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]
