Changing superclass of a class
Alain Fischer
alain.fischer at bluewin.ch
Fri Jul 19 11:09:44 UTC 2002
Hi Alexandre,
You can use the Behavior>>superclass: message
cls := Smalltalk at: #MyTerrificClass.
cls superclass: (Smalltalk at: #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
|