how to delete a specific instance from an image?

Duane Maxwell dmaxwell at exobox.com
Wed Jul 12 21:03:57 UTC 2000


>Tim Rowledge <tim at sumeru.stanford.edu> wrote:
>
>> You could, in extremis, try 'myNoLongerWantedObject become: Object
>> new' without completely flushing your kharma down the celestial
>> crapper, but never, never do anything like 'myObj become: nil'. This
>> is something I've seen advocated too many times. The last person I
>> caught trying that was invited to a flotation tryout for a new
>> executive concrete desk.
>
>Ooh, exciting.  What does this do?  Does it replace the instance of
>UndefinedObject we all know and love which is referred to by the
>name 'nil' with whatever schmuck object which is recieving the #become:
>nil message?

>From the BlueBook:

become:otherObject

Swaps the instance pointers of the receiver and the argument, otherObject.
All variables in the entire system that pointed to the receiver will now
point to the argument, and vice versa.  Report an error if either object in
a SmallInteger.


Pretty much this is equivalent to "crossing the streams": Try to imagine
all life as you know it stopping instantaneously and every molecule in your
body exploding at the speed of light.

-- Duane





More information about the Squeak-dev mailing list