[Seaside] Help needed for the Back button

Avi Bryant avi at beta4.com
Tue Jun 1 19:44:07 CEST 2004


On Jun 1, 2004, at 7:09 AM, Bany, Michel wrote:

> Here is a link to a Seaside app http://mbany.ath.cx/seaside/go/Hanoi
> where I have problems with the state of an algorithm object.
> Press "Start game",
> then do an explicit move from 1 to 2,
> then press the browser Back button,
> then move again from 1 to 2.
> It reacts as if the Back button was not pressed.
> What did I do wrong ?
> Michel.

Try registering the game object for backtracking (using 
WASession>>registerObjectForBacktracking:).  That avoids using 
WAStateHolder inside the model, and should be more effective than 
wrapping the reference to the game inside a WAStateHolder
(which only does anything if you switch game instances, not if you 
modify the current one).

That'll only work a shallow copy will capture all of the relevant state 
of the HanoiGame; I haven't looked at your code deeply enough to know 
if it will.

Avi









More information about the Seaside mailing list