How to Remove Windows from "world" (world.submorphs) using code?(from workspace)

Hernan Tylim htylim at yahoo.com.ar
Sat Aug 21 01:54:24 UTC 2004


Hi Milan, 

	This will remove all EllipseMorph instances from the
ActiveWorld.

(ActiveWorld submorphs select: [:ea | ea isKindOf: EllipseMorph ]) 
	do: [:ea | ea delete]

	Hope it helps.

Regards,
Hernán


> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Milan Zimmermann
> Sent: Friday, August 20, 2004 9:45 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: How to Remove Windows from "world" (world.submorphs) 
> using code?(from workspace)
> 
> 
> Hello,
> 
> I think I have seen some code to do this but cannot find it 
> on Swiki or the 
> mailing list.
> 
> The reason I am trying this: I have a simple "game" which has 
> a yellow ellipse 
> in  it, when running it, something there keeps creating large 
> amount of 
> yellow ellipses (perhaps copies) that are visible when I do 
> WorldMenu-->Windows-->find window-->Ellipse999.
> 
> I would like to write code to remove them, and then try to 
> find what's 
> creating them. I know I can do WorldMenu-->Windows-->find 
> window-->Ellipse999, click "x", but that would take forever 
> .. plus I will 
> learn this way.
> 
> Appreciate any hints, thanks, Milan
> 




More information about the Squeak-dev mailing list