[Bese-devel] Backtracking question

Marco Baringer mb at bese.it
Sat Aug 6 09:10:21 UTC 2005


William Halliburton <whalliburton at gmail.com> writes:

> Val1 works as expected. I can toggle it and it will not affect other
> frames that have forked. Val2, on the other hand, does not work as
> exprected. Toggling and then reloading the page will toggle again,
> also forking the page and toggleing on one page will set the value in
> all instances. I replaced copy-seq with my own function for copying
> and it looks like it is never called. I am assuming that I have a
> misunderstanding about how the backtracking works.

ok, this was something of a pain to track down but turned out to be a
bug in ucw's backtracking stuff. thanks for the report (and in
particular the test case).

to make a long story short we were copy'ing values where we didn't
need too (when creating the new backtrack list) and not doing it when
we should have (when restoring old backtracks after the user had used
the back butten). what ended up happening is that we'de save, for
example, (NIL) in the backtrack, you'do go forward a bit and then come
back. when you came back we used that exact list, instead of a copy,
and you'd change it (in the backtest-toggle-2 action). we'd then start
saving/copying that list, madness would ensue.

do a darcs pull from the ucw_dev repo to get this fix (the patch
you're interested in is called "Fix backtracking on non immediate
objects").

> Does anyone have a good explanation on the backtracking and how to fix
> this code.

how to fix it? the same way i fix everything! shoot marco! :)

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the bese-devel mailing list