Having problems with states

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Having problems with states

NorbertHartl
Hi,

yesterday I discovered some trouble using states. I have
a component that implements

states
   ^ Array with: self

And this components has a few instance variables that need
to be backtracked.

The first action that I do sets the model of this component.
On the next action the model is set to something different.
If I use the back button the reach the first point and click
a link that displays the component again the model from the
second step is set in the component.

Do I need to do more than implementing states? How can I
myself check if it is working correctly?

thanks,

Norbert

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Having problems with states

Lukas Renggli
> Do I need to do more than implementing states?

No.

> How can I
> myself check if it is working correctly?

Override #snapshotCopy and #restoreFromSnapshot:, put a #halt in there
and call super. These methods should be called whenever an object is
snapshot/restored.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside