This was adapted from http://www.squeak.org/Smalltalk.
SystemDictionary addToStartUpList: {class-name}.
The class is required to understand the #startUp: message,
which will be sent to it when the image is loaded and started.
#startUp: accepts a Boolean telling it
whether the image is resuming (newly started).
Also see
How to lockdown an image for release.
This concept is not directly supported in Smalltalk.
A method is essentially abstract if
it returns "self subclassResponsibility".
A class is essentially abstract if it contains any abstract methods.
In Smalltalk development environments the mouse buttons are referred to as red, yellow and blue. These are mapped differently under different OSes. The mappings are summarized in the table below.
| Button | Linux/UNIX | Mac OS X | Windows |
|---|---|---|---|
| red | left | ||
| yellow | option-click or wheel-click | ||
| blue | cmd-click or right |
Syntax
- see http://squeak.joyful.com/LanguageNotes
- blocks
* surrounded by [ code ] (after all, real blocks have square corners)
* parameters are preceded by colons and
the parameter list is terminated by a vertical bar
- example: [ :p1 :p2 | code ]
* implemented by BlockClosure objects
* executed with value methods that pass arguments into the block
- see Kernel-Contexts ... BlockClosure ... evaluating ... value*
Implementations
- open source (partial list)
* F-Script - Smalltalk for Mac OS X Cocoa development
* GNU Smalltalk
* #Smalltalk (Sharp Smalltalk) - for .NET
* Squeak
* Talks2 - implemented in Java and can use Java libraries
Squeak
- websites
* http://www.squeak.org
* http://wiki.squeak.org/squeak
- mailing lists
* listed at main website community link
- wikis
* listed at main website community link
- download from http://www.squeak.org
- to run, double-click an .image file
* one ships with Squeak, but you can create more
by saving changes you make to that one
- appearance
* to change the appearance of many things in the GUI,
click ... appearance...
* full-screen mode
- to turn on, select "full screen on"
- to turn off, select "full screen off"
* desktop color
- select "set desktop color..." and
drag the eye dropper through the color bar
* also see "set gradient color..." and "use texture background"
which are mutually exclusive options
- to collapse or uncollapse a window
* click the circle icon on the far right end of the title bar
- projects
- like virtual workspaces with their own sets of open windows
- to create a new project
- to enter an existing project
* click in the project window
- to return to the root project
* click ... previous project
- flaps (a.k.a. tabs) on the edge of the main window
* click to open them
* to close them either click again or click a different flap
- version control
* it's automatic!
- refactoring browser
* see http://wiki.squeak.org/squeak/227
- to save the current environment
* using the current image, click ... save
* creating a new image, click ... save as...
- to exit Squeak
* click ... save and quit | quit
File List
- to open a file list
* red-click desktop, select "open..." and select "file list"
- to open a text file from the file system
* navigate to the directory in the left pane
* select the file in the right pane
- if the file contains Smalltalk code (*.st)
add it to the image by pressing the "fileIn" button
at the far right end of the button bar
- to change the way files in the right pane are sorted
press the "name", "date" or "size" buttons in the button bar
Method Finder
- red-click, open..., "method finder"
- enter part of a method name and press enter
to get a list of all method names that contain it
- click a method name in the list to see the class that defines it
System Browser
- categories
* to located a category
- click in the category pane
- type the first letter of the category name
* to create a new category
- yellow click in category pane
- select "add item..."
- enter the name of the new category
* to put categories in alphabetical order
- yellow-click in the category pane and select "alphabetize"
* to save all the code for a selected category
- yellow-click in the category pane and select "fileOut"
- will write a .st file to the directory containing the Smalltalk image
- see "File List" to read it back in to another image (fileIn)
- classes
* to find the definition of a class
- yellow-click in the category pane and
select "find class..." or press ctrl-f
* to view a recently viewed class
- yellow-click in the category pane and
select "recent classes..." or press ctrl-r
* to view instance or class methods, press the "instance" or "class"
button at the bottom of the class pane
* the "?" button between the "instance" and "class" buttons
displays only the documentation for the current class in the bottom pane
* to open a new System Browser for the selected class
- yellow-click in the class pane and
select "browse full" or press ctrl-b
* to show the definition of the selected class in the bottom pane
- yellow-click in the class pane and select "show definition"
* to show the hierarchy of the selected class in the bottom pane
- yellow-click in the class pane and select "show hierarchy"
* to open a Hierarchy Browser for the selected class
- yellow-click in the class pane and
select "browse hierarchy" or press ctrl-h
* to save all the code for a selected class
- yellow-click in the class pane and select "fileOut"
- will write a .st file to the directory containing the Smalltalk image
- methods
* to add a new method to a class
- select a protocol or "as yet unclassified" in the protocol pane
- a method template will be displayed in the bottom pane
- modify the template to specify the method implementation
- to save it yellow-click in the bottom pane and select "accept"
or press ctrl-s
- if there are any coding errors, the incremental compiler
will display an error message in the code near the error
* to find a method in the selected class
* yellow-click in class pane
* select "find method..." to select from a list of all methods in the class
* select "find method wildcard" to search for method names
that contain a given string
* to fina a method in any class
* see Method Finder
Transcripts
- to open a Transcript window
* click ... open ... transcript (ctrl-t)
* can also open the Tools flap and drag a Transcript out of the flap
* when more than one are open, output goes to all of them
- to send output from a Workspace to the Transcript
* enter in the Workspace "Transcript show: {expression}
* do it (ctrl-d)
Unit Testing
- see SUnit
Workspaces
- to open a Workspace window
* click ... open ... workspace
* can also open the Tools flap and drag a Workspace out of the flap
- enter expressions in the workspace
- to execute consecutive expressions
* select them
* yellow-click and select "do it" or press ctrl-d
- to execute consecutive expressions and print the result of the last one
* select them
* yellow-click and select "print it" or press ctrl-p
* output will appear in the workspace after the last expression
Copyright © 2007 Object Computing, Inc. All rights reserved.