[squeak-dev] change class to object

Gabriel Brunstein gaboto at gmail.com
Thu May 14 13:36:34 UTC 2009


The message #become: changes an object with another, indeed, it changes all
the references to this object to point to the other one. It can be useful,
for example,  when your want an object to be wrapped by another one, so you
can replace the original object with the wrapper in the whole image (It
takes a long time so it is an inefficient way to do that)On the other
hand, #primitiveChangeClassTo:
changes the class of an object with another one. It is useful when you want
to implement an instance wrapper for example (read more on the paper called
"wrappers to the rescue").



2009/5/14 Göran Krampe <goran at krampe.se>

> Miguel Cobá wrote:
>
>> anObject become: aClass
>>
>> but read the class comments for notes
>>
>
> Ehrmm... eh, nope. That would not be a good thing to do. ;) Was this just a
> guess or a true misunderstanding of the question? Just curious.
>
> regards, Göran
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090514/702b0810/attachment.htm


More information about the Squeak-dev mailing list