On Sep 24, 2011, at 6:50 PM, Tudor Girba wrote:
Hi,
I am testing the latest Pier2 based on Pharo 1.3, and I got an error when trying to use the image-based persistency.
The error happens in:
PRImagePersistency>>saveImageAndBackupAs: aString ... image openSourceFiles; saveImageSegments; snapshot: true andQuit: false
in particular, the SmalltalkImage does not understand saveImageSegments anymore. Is this some cleanup that happened in Pharo and that requires a new package to be loaded?
We started to clean up ImageSegments in 1.3. Most of ImageSegments is there (and even cleaned and fixed by Mariano while he analyzed the code). We removed all of ImageSegment code in the image in 1.4, though. After *very* careful analysis *and* implementing a better replacement... (Fuel). The #saveImageSegments when saving the Image itself I removed in 1.3 already (after sending a mail to the list to ask if anyone uses it). The idea was that on image save, if image segments are written to disk, it would copy them over if you rename the image on save: saveImageSegments: previousFullImageName "This method is used for example when you save an image with another name. In this case, if there are segments written to files and there are ImageSegment instances, then it copies the file from the previous image location, to the new one. It is like a backup of the segment files when renaming an image. " | haveSegs oldImageSegDir theClass newImageSegDir | "If the class does not exist or has no instances, it has no sense to backUp the segments." self areThereImageSegments ifFalse: [ ^ self ]. theClass := Smalltalk globals at: #ImageSegment. oldImageSegDir := theClass segmentDirectoryFrom: previousFullImageName. newImageSegDir := theClass segmentDirectory. "create the folder" oldImageSegDir fileNames do: [ :theName | | imageSegmentName "copy all segment files" | imageSegmentName := oldImageSegDir pathName , FileDirectory slash , theName. newImageSegDir copyFileWithoutOverwriteConfirmationNamed: imageSegmentName toFileNamed: theName ] So if your image has no image segments, than it's ok to just remove the call. Marcus -- Marcus Denker -- http://marcusdenker.de