Changes

Jump to navigation Jump to search
Line 89: Line 89:  
The [[The Undiscoverable/Squeak/Halo|Halo]] has its own page, which introduces the set of tools provided by the halo, including [[The Undiscoverable/Squeak/Object Viewer|Object Viewers]].
 
The [[The Undiscoverable/Squeak/Halo|Halo]] has its own page, which introduces the set of tools provided by the halo, including [[The Undiscoverable/Squeak/Object Viewer|Object Viewers]].
    +
[[File:SqueakWorkspaceHalo.png]]
 +
 +
==The System Browser==
 +
 +
If you open the Tools tab and drag a System Browser onto the Desktop, you will get a display similar to this. If you select Kernel-Numbers in the leftmost pane, and then Fraction in the next pane over, you should see almost exactly this.
 +
 +
[[File:SqueakSystemBrowserFraction.png]]
 +
 +
The System Browser window has the same top toolbar and outer frame around the other three sides as a Workspace window, but is divided into several panes. The four panes on top allow users to explore the Smalltalk Object hierarchy. The panes are called, from left to right,
 +
 +
* System Category pane
 +
 +
* Class pane
 +
 +
* Class category pane
 +
 +
* Method pane
 +
 +
Next may come an optional Annotation pane, which can be turned on or off in the Preferences, and is omitted here.
 +
 +
Below those are a text pane for various purposes, with a row of buttons at the top These buttons open other windows for various purposes. At the bottom is a comment pane where the programmer can explain the purpose of the Object type being viewed and how it is to be used.
 +
 +
==Smalltalk Language==
 +
 +
Smalltalk is an extremely powerful, expressive, modular language with a number of other virtues. All of a Smalltalk system is written in Smalltalk, including a compiler that turns Smalltalk program text into platform-independent bytecodes. At runtime, a Smalltalk image runs on top of a highly portable Virtual Machine that provides system facilities and the lowest-level object functions, including a bytecode interpreter that runs all of the higher-level code.
 +
 +
The VM also exists inside Smalltalk as a model written in a subset of Smalltalk, allowing Smalltalk to run on a modified VM inside the current Smalltalk in order to debug the new VM. A satisfactory new VM is then translated to a highly portable subet of C, which can be compiled for all supported platforms in short order. The new compiled VMs are then packaged with the new Smalltalk (or Squeak or Etoys) image, including the Smalltalk model of the new VM, for distribution.
 +
 +
Everything in Smalltalk is an object. All Smalltalk programming consists of defining object classes and sending messages to objects, where the messages can refer to other objects. Every object is a member of a class that defines its structure in terms of internal data objects and methods of interpreting messages sent to the object
 +
 +
Open the Tools palette and drag a new Workspace into the world. Type 3+4 in the window, and make sure to leave the cursor on that line. Middle-click and select print it from the menu.
 +
 +
[[File:SqueakWorkspaceMenu.png]]
 +
 +
Smalltalk evaluates the expression and displays the value in the Workspace, thus.
 +
 +
[[File:Squeak3+4PrintIt.png]]
 +
 +
The number 3 is an object, a member of a numeric class of small integers. We send it the message + 4, invoking the method for + on that kind of integer with the argument 4, referring to a different object. We get back the object 7, and the interpreter invokes a method for printing that result in our Workspace.
 +
 +
 +
 +
A brief introduction to the subset of Smalltalk used in these pages is on the [[The Undiscoverable/Smalltalk|Smalltalk]] page. There are several good textbooks on Smalltalk.
 +
 +
==Creating an Object==
 +
 +
The mechanics of object creation using a [[The Undiscoverable/Squeak/System Browser Use|System Browser]] with a bit of Smalltalk programming are on a separate page.
 +
 +
==Tutorials==
 +
 +
At this point, if you have gone through the material above plus the pages linked to, you know enough to follow many of the available introductory [http://wiki.squeak.org/squeak/792/ Squeak tutorials].
 +
 +
For those who wish to dive deeper into Smalltalk, there are a number of free digital books available at [http://stephane.ducasse.free.fr/FreeBooks.html Stef's Free Online Smalltalk Books]
    
{{stub}}
 
{{stub}}
1,009

edits

Navigation menu