[squeak-dev] forward: and turn: in Morph - are we missing
immediacy?
K. K. Subramaniam
kksubbu.ml at gmail.com
Tue Sep 28 07:00:02 UTC 2010
On Tuesday 28 Sep 2010 6:18:37 am Robert Hawley wrote:
> I find it odd, and obscure that forward: and turn: are not in the class
> Morph.
>
> This means that the following gives an error:
>
> x := EllipseMorph new openInHand.
> x forward: 100.
I suppose you really meant openInWorld which creates a container-contained
relationship between a morph and its world. openInHand (pick) takes a morph
out of its container and so geometric ops no longer apply.
Conceptually, Morphs exist as pure shapes composed hierarchically and react to
Events from Hands. Dropping them into a world establishes a transform for its
owner for rendering it in its visual fields. Transform parameters are affected
by ops like move, rotate, scale, align, distribute, lower, raise etc. These
messages are sent to the owner. Self-centric ops like forward: and turn:
operators require an agent like Player to mediate between morph and its owner.
I suspect space and performance considerations prevented such transforms from
being put into every Morph.
HTH .. Subbu
More information about the Squeak-dev
mailing list
|