Navigation:  Tutorials > Beginners Guide to Smalltalk > Playing with Objects in the Playground >

Experimenting

Previous pageReturn to chapter overviewNext page

Nearly all the "fun" of Smalltalk is that you can dynamically interact with the objects that you create. Why not now try some experiments on your own? Ask the Playground objects to perform some operations and then query their states. Perhaps you'll want to add some new shapes.

The following messages are available for you to play with.

Message

Parameter

#sides

None

#sides:

An integer

#radius

None

#radius:

A number

#rotation

None

#rotation:

A number

#position

None

#position:

A point (e.g: 50@60)

#color

None

#color:

A color (e.g. Color red)

#growBy:

A number

#shrinkBy:

A number

#rotateBy:

A number

#moveBy:

A point (e.g: 50@60)

#moveUp:

An integer

#moveDown:

An integer

#moveLeft:

An integer

#moveRight:

An integer

#chooseColor

None

Remember, if you make a mistake (perhaps by providing an incorrect type of parameter), you'll most likely bring up a walkback. This protects you from doing any real damage. If this happens, simply click Terminate to continue and then try to fix the problem. If you really get into trouble you should be able to clean things up by closing the Playground window and the associated workspace and starting again.