-
image and changes
The current system image is a snapshot of a running Squeak system, frozen in time. It consists of two files:
-
.image
filecontains the state of all of the objects in the system(including classes and methods, since they are objects too)
-
.changes
filecontains a log of all the changes to the source code of the system
Never edit them directly with a text editor, as Squeak uses them to store the objects you work with and to log the changes you make to the source code.
-
-
Launching
double-click the
virtual machine icon
;drap the
.image
file onto theicon of the virtual machine
;at the command line type the
name of the virtual machine
followed by the path to the.image
file;Squeak makes heavy use of context-dependent pop-up menus.
Squeak was originally designed for a computer with a three button mouse.
Squeak avoids terms like “left mouse click”, instead, the mouse buttons are labeled with colors:
-
red button(common the left one)
pressed to get the “World” menu;
-
yellow button (common the right one)
bring up a contextual menu, which mean a menu that offers different sets of actions depending on where the mouse is pointing;
-
blue button (common the scroll wheel)
to activate the “morphic halo”, an array of handles that are used to perform operations on the on-screen objects themselves, such as rotating or resizing;
-
-
When you start Squeak for the first time
When you start Squeak for the first time, the Squeak virtual machine loads the
image
file that you provide.This
image
file contains a snapshot of a large number of objects, including a vast amount of pre-existing code and a large number of programming tools (all of which are objects).As you work with Squeak, you will send messages to these objects, you will create new objects, and some of these objects will die and their memory will be reclaimed (i.e., garbage-collected).
When you quit Squeak, you will normally save a snapshot that contains all of your objects. If you save normally, you will overwrite your old
image
file with the new snapshot. Alternatively, you may save the image under a new name. -
Active Window
At any time only one window is active, it is in front and has its label highlighted.
-
Objects
-
transcripts
The
transcripts
is an object that is often used for logging system messages;Transcripts is terribly slow;
Transcripts is not thread-safe’;
-
workspaces
Workspaces
are useful for typing snippets of Smalltalk code that you would like to experiment with;also notebook;
also as a tag of a captured image;
-
Inspector
The
inspector
is an extremely useful tool that will allow you to browse and interact with any object in the system. -
system browser
-
Message
You never tell an object what to do – instead, you politely ask it to do something by sending it a message.
The object, not you, selects the appropriate method for responding to your message.
-
Codes
Transcript show: 'hello world'; cr # cr means carriage return
-
Keyboard shortcuts
$ do it # ctrl+d or alt + d $ print it # ctrl+p $ inspect it # ctrl+i $ explore it # ctrl+I
-
References
- Squeak by Examples(5.3 Edition)