[Laszlo-dev] lz.History: Save state without creating new context?
André Bargull
andre.bargull at udo.edu
Sat Apr 24 15:18:21 PDT 2010
Is it possible to commit the current state without calling
"lz.History.next()", because "next()" does always create a complete new
history context.
I've attached a simple test application which uses lz.History, the
application will replace the current lz.History example in the
Developer's Guide (this is part of my change for LPP-7959, the old
example is somewhat difficult to understand, at least this is my
impression). The browser back-button integration is working in my
application, only the forward-button doesn't really work. You can easily
reproduce this by clicking on "STATE_2", "STATE_3" and finally "END". If
you use the brower's back-button, you can navigate back to the initial
state "STATE_1". But if now use the forward-button, you'll end up at
"STATE_3" instead of "END".
Adding this additional call to "save()" in l.41 won't help, because it
only saves the new value in the temporary cache of lz.History
("lz.History.__lzcurrstate"), but the value is not committed.
> lz.History.save('main', 'mystate', newstate);
To make the temporary changes persistent, you'd need to call "next()",
but that also creates a complete new context - and I don't want that to
happen. Otherwise you'd need to press the back-button two times to make
one step back in history and that's not acceptable. Any lz.History
expert out there to help me out?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dguide_history.lzx
Url: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20100424/5421144b/dguide_history.pl
More information about the Laszlo-dev
mailing list