[squeak-dev] forward: and turn: in Morph - are we missing immediacy?

Hannes Hirzel hannes.hirzel at gmail.com
Tue Sep 28 09:20:08 UTC 2010


On 9/28/10, K. K. Subramaniam <kksubbu.ml at gmail.com> wrote:
> 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.

I assume so as well.

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.


Yes, that might have been a good idea 10 years ago. But these days it
does not matter at all in terms of speed having these methods.

forward: and turn:

which delegate to the player.

--Hannes



More information about the Squeak-dev mailing list