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

Lawson English lenglish5 at cox.net
Fri Nov 5 15:17:36 UTC 2010


Thanks. I know there are many different ways of doing what I was trying 
to do. I was just pointing out  a simple mistake that was hanging the 
system. Passing a nil value in a message should never cause a complete 
lockup, IMHO.
Lawson

> 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