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

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Jun 8 21:34:54 UTC 2012


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