Re:Squeak tutorials available

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re:Squeak tutorials available

Howard Stearns
If you're new to Squeak, there are some basic things that you need to  
learn from these tutorials:

Squeak stores everything not in individual source files, but in an  
"image" that consists of two files (with extensions .image  
and .changes).
You run squeak by executing an .image on an operating-system-specific  
virtual machine executable.
     E.g, double click the VM and specify image name, or drag .image  
file onto VM file.
The "source" for what you actually need to work with is in the image,  
as described below.
    Don't even think of "recompiling from source." That's almost  
certainly not going to help a non-expert Squeaker or be meaningful.
red/yellow/blue button terminology to work around the fact that mac/
old-Windows/new-Windows/Unix are all different.
World menu: click on the desktop.
Class (aka System) browser: World -> open -> class browser
System browser has (on top from left to right): Packages (groups of  
classes), Classes, Categories (groups of methods), Methods
    E.g., Select a Package, then a Class within that package, then a  
category (or --all--), then a method. Method source appears at botttom.
    But Package is not alphabetical, and the names don't mean  
anything to you yet, so....
    At the top of most scroll bars is a tiny little square box with a  
little square in it. Click on that to get a menu of stuff peculiar to  
what's being shown in that scroll bar.
    E.g., the menu at the top of the Category pane has Find Class.  
E.g., enter any part of TFrame.
There are instance methods and class methods, where the latter act  
kind of like instance methods on the class metaobject.
     E.g., suppose Foo is a class:
         aFoo := Foo new.   aFoo someInstanceMethod.   Foo  
someClassMethod.   aFoo class someClassMethod.
     Click the 'instance' or 'class' button under the Class pane to  
see only instance methods or only class methods listed on the right.
After editing, to 'accept' a method definition (saves in image and  
compiles), use that little square menu button on the top of the  
method source scroll bar.
Note that a lot of stuff in menus has a hot-key accelerator.
workspace: World -> open -> workspace
    You can do the following in method source editors, too, but  
beginners tend to want to keep those "clean" and do their scratch  
work in a workspace.
highlight code and use the little square menu on the scroll bar to:
    print it - evaluates the code and prints the result.
    do it - just evaluate it for side-effect
    more...
       browse it, senders of it, references to it,
       selectors containing it, method strings with it, methods  
source with it,
       etc.  By the way, a method that takes multiple arguments has a  
method selector with several parts, separated by a colon.
          e.g., an example in source might be someInstance foo:  
fooArg bar: 3 baz: "some string". The selector is foo:bar:baz:
          We tend to write #someMethod:withArg: in correspondence to  
make the method selector stand out, or
           SomeClassName>>someMethod:withArg: to indicate we mean an  
instance method of a particular class.
World->save as new version  (makes a copy of the image, with  
everything you've changed)
World->save and quit

On Jan 5, 2007, at 1:23 PM, Howard Stearns wrote:

> Matthew Fulmer has been hard at work putting together an annotated  
> list of Squeak tutorials. See http://wiki.squeak.org/squeak/792
>
> Thanks, Matthew!
>
> -- background --
>
> Croquet piggy-backs on top of Squeak (http://squeak.org):
>  - partly because we need a bit identical cross-platform environment.
>  - partly because Squeak is a damn good self-documenting dynamic  
> language programming environment.
>  - partly because it's got a heck of a lot of good libraries built  
> in, with a great community making more.
>
> Croquet itself is distributed as a Software Developer's Kit: to do  
> anything, you need to do some programming using the examples given.  
> This programming is done in Squeak.  Croquet doesn't provide  
> tutorials on the Squeak platform or Smalltalk language, but the  
> very active Squeak/Smalltalk community does.
>
> --
> Howard Stearns
> University of Wisconsin - Madison
> Division of Information Technology
> mailto:[hidden email]
> jabber:[hidden email]
> voice:+1-608-262-3724
>