Changing superclass of a class

Alain Fischer alain.fischer at bluewin.ch
Fri Jul 19 12:07:45 UTC 2002


Hi Alexandre,

I have forgoten the parent children relation and the meta level so 
ignore the preceding mail.
Use the following:

ClassBuilder new reshapeClass: MyTerrificClass to: nil super: 
MyFabulousSuperClass

Have a nice day
Alain.

Le Vendredi 19 juillet 2002, à 11:07 , Bergel Alexandre a écrit :

>> Object subclass: #Collection
>> 	instanceVariableNames: ''
>> 	classVariableNames: 'RandomForPicking '
>> 	poolDictionaries: ''
>> 	category: 'Collections-Abstract'
>>
>> Change 'Object' to other class and accept-it.
>
> :-)
> I know that.
> But if I want to do that manually ?
> The ideal way would be to have a msg such as :
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> cls := Smalltalk at: #MyTerrificClass.
> cls changeSuperclassFor: (Smalltalk at: #MyFabulousSuperClass).
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._
> Bergel Alexandre  http://www.iam.unibe.ch/~bergel
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^
>




More information about the Squeak-dev mailing list