[Seaside] A quick note about backtracking, #states,
#snapshotCopy and #restoreFromSnapshot:
Sven Van Caekenberghe
sven at stfx.eu
Thu May 22 14:48:12 UTC 2014
A quick note about backtracking, #states, #snapshotCopy and #restoreFromSnapshot: since I lost quite some time figuring this out.
In order to make backtracking work, you need to implement #states on your component, we all know that.
However, if you put a more complex object with nested sub objects in your states collection, this will fail unless you also customise (i.e. override) both #snapshotCopy and #restoreFromSnapshot: because the default implementation only does a #shallowCopy which ignores #postCopy.
I did not find anything about this in http://book.seaside.st and this strikes me as both quite important and hard to figure out.
More information about the seaside