Undoing save as new version

Derek Brans brans at nerdonawire.com
Wed May 21 05:41:29 UTC 2003


Unless I'm mistaken, SystemDictionary>>saveAsNewVersion has nothing to do
with image version (3.4, 3.5, etc.)

If your image filename is "myImageName.x.image", calling
SystemDictionary>>saveAsNewVersion is like calling "save as" and saving your
image as: "myImageName.y+1.image", where y is the highest integer satisfying
this naming convention for image files already present in your default
directory.  (Hope that's not too confusing).

So if you're running Squeak3.2.image, saveAsNewVersion sees you're running
myImageName.2.image, where myImageName is "Squeak3".  The next logical
version of the file would be 5, since myImageName.4.image already exists.


> By the way, this method had slightly surprising behavior.  I'm running
> a 3.2 image, but also have a 3.4 image in the same directory.  When I
> saved as new version, it used version 3.5.
> FileDirectory>>nextNameFor:extension:  implements this behavior (it
> finds the highest version number in the directory and adds 1), but to
> me it makes more sense to bump the current image version number by 1
> and complain if there's a conflict with an existing file.
>
>
>




More information about the Squeak-dev mailing list