[squeak-dev] Bug (feature?) in SystemWindow>>addAllMorphs:aCollection

Hannes Hirzel hannes.hirzel at gmail.com
Fri Nov 5 13:24:53 UTC 2010


Hello Lawson

Please try this....

| myWindow m1 |

myWindow := SystemWindow labelled: 'test'.
myWindow model: Model new.
"A system window needs a model"

1 to: 10 do: [ :i | m1 := EllipseMorph new..
			myWindow addMorph: m1 frame: (0 at 0 corner: (i/10) @1).
			
			"system windows are made for tools,
			 and they try to maintain a color scheme.
			 SystemWindows nowadays set the color of added morphs to white.
                   But when you alter the color after adding it, it stays.
			So we do the color now..."

			m1 color: Color random].

myWindow openInWorld.


Does this help?


Hannes


On 11/5/10, Lawson English <lenglish5 at cox.net> wrote:
> OK, don't do this at home, but even so, this shouldn't permanently
> disable the system...
> Using Squeak 4.1 + Seaside 3.0:
>
>
> myWindow := (SystemWindow labelled: 'test') openInWorld.
>
> myArray := Array new: 10.
>
> "add zero or more morphs to myArray, but less than myArray size"
> myWindow addAllMorphs: myArray.
>
> "squeak stops working..."
>
>
> Lawson
>
>
>
>
>
>
>
>
>



More information about the Squeak-dev mailing list