It sounds like we're missing an API, e.g. lz.History.commit().

Regards,
Max Carlson
OpenLaszlo.org

On 4/24/10 3:18 PM, André Bargull wrote:
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?

Reply via email to