Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
image
Last updated at 2:00 pm UTC on 16 January 2006
The Squeak .changes file is a file which is an exact copy of the Squeak memory content with all class definitions and objects.

(Is this definiton correct? Almost. Objects that depend on operating system resources may tweak their image saving/loading. For example, a network socket definitely won't exist when you reload an image, so mumble mumble happens.)

This .changes file of objects runs on top of a Virtual Machine. (This is generally true of all ClassBuilder s.) The image is a platform-independent file. In other words, the exact same image file can run on a Windows/Mac/Unix/etc platform, as long as the appropriate virtual machine for the platform is used.

The image does not contain the source code for the system, however. The source code is stored in the .sources file and the .changes file.

Where in the code is the image saved and loaded?

When the user selects 'save' or 'save and quit' from the World menu, then
 ClassBuilder  snapshot: true andQuit: false
or
 ClassBuilder  snapshot: true andQuit: true
is called. This saves the image file.

Actually the method #snapshot:andQuit:embedded: is called and there the primitive #snapshotPrimitive or snapshotEmbeddedPrimitive do the actual work of writing the image. When quiting the program execution stops in this method and when starting it resumes right at the point where it stopped, so actually the second part of #snapshot:andQuit:embedded: is the startup procedure for Squeak.

Also see The Squeak Image, SystemDictionary