Balloon3D refactored

Torge.Husfeldt Torge.Husfeldt at gmx.de
Tue Nov 19 08:42:29 UTC 2002


Hi Ned,

Didn't you mean:

|instances |
instances := B3DSceneMorph allInstances.
instances elementsExchangeIdentityWith:[instances collect:[:dummy | Morph new]].
?

I don't know the actual number of instances that are to be replaced,
but since i read about this issue i made it a general rule never to
iterate over #become:

just my two cents.

Torge
Am 18.11.2002 19:01:57 schrieb Ned Konz <ned at bike-nomad.com>:

>On Monday 18 November 2002 07:12 am, David Duke wrote:
>> But I'd like to know why I'm having so much trouble
>> removing this BookMorph object; am I doing something stupid, or
>> missing the obvious?
>
>This is a brute-force method that may work:
>
>B3DSceneMorph allInstancesDo: [ :ea | ea delete ].
>Smalltalk garbageCollect.
>
>or the perhaps less drastic:
>
>B3DSceneMorph allInstancesDo: [ :ea | ea become: Morph new ].
>
>-- 
>Ned Konz
>http://bike-nomad.com
>GPG key ID: BEEA7EFE
>
>
>






More information about the Squeak-dev mailing list