become: changes the pointer pointing to the objects not the object itself. So I'm not sure that instance should be changed. If I remember correctly what allinstances does is that it use nextObject to iterate over the object spaces. Stef On Dec 2, 2009, at 10:21 AM, Mariano Martinez Peck wrote:
Hi! Look this peace of code:
| instance | instance := TestCase new. Transcript show: TestCase allInstances size; cr. instance become: 'aString'. Transcript show: TestCase allInstances size; cr.
The size of TestCase instances is always the same. Although I used become: (and changed to an instance of another class) to one of its instances.
So, my main question is, is this correct ? Or the message allInstances to TestCase should not take into account the instance I sent the message become: ?
Thanks in advance.
Mariano
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project