[squeak-dev] miss-used become: ???

Chris Muller asqueaker at gmail.com
Sat Jun 9 15:07:17 UTC 2012


Does become: swap the references in the currently executing MethodContext too?


On Fri, Jun 8, 2012 at 4:34 PM, Nicolas Cellier
<nicolas.cellier.aka.nice at gmail.com> wrote:
> UnscriptedPlayer>>assureUniClass
>        "Create a uniclass and become the receiver into it"
>
>        | anInstance |
>        anInstance := self rootClassForUniclasses instanceOfUniqueClass.
>        anInstance initializeCostumesFrom: self.
>        self become: anInstance.
>        ^ anInstance
>
> As I understand it, after the become: self is anInstance and anInstance is self.
> So this would answer the original UnscriptedPlayer before the become...
> Is this really the intention?
> Otherwise, becomeForward: would work better.
>
> Nicolas
>


More information about the Squeak-dev mailing list