judaly at gmail.com
Fri Dec 1 18:32:34 UTC 2006
Thank you, that's makes sense
From: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of Herbert
Sent: 30 November 2006 19:11
To: Herbert König; The general-purpose Squeak developers list
Subject: Re: instance side
should have read better before sending, so again:
in object land (Smalltalk) programs are messages sent to objects.
Objects are instances of classes.
So if a message is meant to go to an instance of a class (big
majority) it is defined on the instance side of the class. If it goes
to the class itself it is defined on the class side.
If you open a browser, select any class, you will find two buttons
below the class pane, one named instance, one named class which will
show you two sets of methods one set defined on the instance side the
other set of methods defined on the class side. The latter are usually
much fewer than the first.
Something to enter and doIt in a Workspace, remember messages to
instances are defined on the instance side, messages to classes are
defined on the class side:
myRectangle := Morph new
"here the new message goes to the class Morph to create a new
instance, which can be referred to through the variable myRectangle"
"the instance is sent the message openInWorld, you will see a blue
rectangle top left of Squeak's Window"
myRectangle color: (Color green)
"This is a combination: The instance is sent the message color: which
needs a parameter, the expression in the (unnecessary) brackets.
This parameter is created by sending the message green to the Class
So in a Browser find Class Morph, on the instance side you will find
the message color: and if you find Class Color you will find the
message green on the class side"
Herbert mailto:herbertkoenig at gmx.net
More information about the Squeak-dev