Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
General useful Squeak stuff
This is a dump of all sorts of useful stuff in Squeak that was useful to us during the semester.
See if a instance is of a particular class
self isMemberOf: SketchMorph
See if a instance is of a class or decendent class of
self isKindOf: SketchMorph
Get the class name of a instance
1 class name asString
Get the class category of a instance
1 class category asString
Get the class comment of a instance
1 class comment asString
Browse the code of a instance
1 class browse
Entering the debugger from code
Opening a inspector from code
Randomize a collection
Swapping two arrays
x become: y.
Get the ASCII value of a character
Converting a number between different bases
11 radix: 16
Say that you want a list of even numbers from 1 to 10
An easy way to do this sort of thing is through a Interval object.
x:=Interval from: 1 to: 10 by: 2.
Getting the receiver
Links to this Page