[Seaside] registerObjectForBacktracking, submit and execute b lock

Andreas Nilsson wahboh at mac.com
Mon Aug 30 12:57:08 CEST 2004

I agree, that let's the user implement whatever behavior he or she  
wants for a class.
A neat way to use it would be to implement these methods on your  
subclass of WAComponent to snapshot everything you wan't in that  
component and then register the whole component for backtracking. That  
would save you the trouble of subclassing / encapsulating the  
collections to implement the methods.
Any idea of when we'll see it implemented in Seaside?


On 2004-08-30, at 12.40, Avi Bryant wrote:

> On Aug 30, 2004, at 11:09 AM, Bany, Michel wrote:
>> This subject was already discussed here. See
>> http://lists.squeakfoundation.org/pipermail/seaside/2004-June/ 
>> 003107.html
>> I have actually fixed the problem with a bit of refactoring of the
>> snapshot logic by moving the snapshot behavior to Object.
>> I defined the following methods in Object
>> . snapshotCopy
>> . restoreFromSnapshot:
>> . isIdenticalToSnapshot:
>> And I changed the following methods in WAStateRegistry accordingly
>> . registerObject:
>> . restoreObject:fromSnapshot:
>> . snapshot
>> . snapshot:isIdenticalTo:
>> The default behaviour remains based on shallowCopy for the snapshot.
>> You may however re-implement the three Object methods as needed in  
>> subclasses
>> to use a deeper copy.
> Thanks, I had forgotten about that discussion.  That's clearly the  
> right solution; let's adopt it.
> Avi
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside

More information about the Seaside mailing list