Hi Ramon,
Ramon Leon wrote:
since the
current persistency models do not work (at least for me), I
have created my own which saves the image on each modification:
PRPersistency suclass: #PRSaveImagePersistency
...
PRSaveImagePersistency>>snapshot
[SmalltalkImage current snapshot: true andQuit: false]
forkAt: Processor userBackgroundPriority
PRSaveImagePersistency>>log: aContext
self snapshot
PRSaveImagePersistency>>do: aBlock
try this for do: and reverseDo:
do: aBlock
contexts do: [:each |
aBlock value: (each setKernel: self kernel; yourself)]
reverseDo: aBlock
contexts reverseDo: [:each |
aBlock value: (each setKernel: self kernel; yourself)]
you probably misunderstood what I did. In fact, I propose a completely
new persistency model that has nothing to do with PRImagePersistency
(mine is called PRSaveImagePersistency).
This persistency layer saves the image every time the model is modified.
It doesn't manage concurrence nor recovering after a bad snapshot.