The Mystery of the Morph - II
Trygve Reenskaug
trygver at ifi.uio.no
Sat Feb 14 12:00:27 UTC 2004
Further study shows that the circles were outside the left hand side of the
scree.
A mystery remains: Why wasen't the rectangle resized to fit the contents?
To summarize:
#leftToRight -> #rightToLeft OK
#rightToLeft -> #leftToRight OK
#leftToRight -> #topToBottom OK
#topToBottom -> #leftToRight OK
#topToBottom -> #rightToLeft Rectangle becomes a square
#rightToLeft -> #leftToRight -> #rightToLeft OK again.
More fingertrouble?
--Trygve
At 14.02.2004 12:15, I wrote:
>Image: 3.6-5429-full
>
>On page http://minnow.cc.gatech.edu/squeak/52 , Hannes Hirzel has a very
>good and very simple example of the layout of Morphs as follows:
>------------------------------
>m := RectangleMorph new.
>m layoutPolicy: TableLayout new.
>m listDirection: #leftToRight. "If you omit this expression you get the
>default "
>"m listDirection: #topToBottom."
>m hResizing: #shrinkWrap.
>m vResizing: #shrinkWrap.
>
>m addMorph: (EllipseMorph new extent: 40 at 40; color: Color red).
>m addMorph: (EllipseMorph new extent: 50 at 50; color: Color yellow).
>m addMorph: (EllipseMorph new extent: 60 at 60; color: Color green).
>m addMorph: (EllipseMorph new extent: 70 at 70; color: Color blue).
>m openInWorld.
>
>
>You can change anytime between:
>
>m listDirection: #leftToRight.
>
>and
>
>m listDirection: #topToBottom.
>------------------------------------
>
>It works! It's simple, it's elegant, it's beautiful.
>
>Now continue with one of these at the time:
>
>m listDirection: #leftToRight.
>m listDirection: #topToBottom.
>m listDirection: #leftToRight.
>
>It still works. Now do
>m listDirection: #topToBottom.
>m listDirection: #rightToLeft.
>
>WE NOW HAVE THREE CIRCLES STACKED ON TOP OF EACH ORDER WITHIN A SQUARE!!!
>
>I must be missing something. But what?
>
>In confusion
>--Trygve
>
>
>
>
>
>--
>
>Trygve Reenskaug mailto: trygver at ifi.uio.no
>Morgedalsvn. 5A http://heim.ifi.uio.no/~trygver
>N-0378 Oslo Tel: (+47) 22 49 57 27
>Norway
>
>
>
--
Trygve Reenskaug mailto: trygver at ifi.uio.no
Morgedalsvn. 5A http://heim.ifi.uio.no/~trygver
N-0378 Oslo Tel: (+47) 22 49 57 27
Norway
More information about the Squeak-dev
mailing list
|