DeltaStreams again

Göran Krampe goran at krampe.se
Fri Aug 24 06:45:12 UTC 2007


Hi!

After yet another night of hacking I have come a bit further. I started
working on #apply and #revert. #revert is implemented like:

    self asAntiDelta apply

...and asAntiDelta is more or less done by:

    changes reverseDo: [:each | antiDelta addChange: each asAntiChange]

...modulo my memory. ;)

I came as far as a test case where I create a DSDelta with three changes:
   - Create class
   - Change its comment
   - Add two ivars

..and then can nuke the class, apply delta (Johnny is back!) and revert
delta (Johnny is gone again!). Well, apart from some buglet in
SystemEditor regarding class comment - this works.

DSDelta>>apply looks something like:

   ^self class applier apply: self

Which means the actual apply code is broken out into an "applier" object
which uses double dispatch on all change instances to do the work. I am
implementing a DSSystemEditorApplier.

Well, that is it for now. :) Note though that I am doing a bit of
"spiking" here - all kinds of changes are not working yet and so on.

regards, Göran




More information about the Squeak-dev mailing list