|
> How can i change my class's parent on another existing one?
Just change and accept the class definition. E.g. if you have
Smalltalk.MyNameSpace defineClass: #MyClass
superclass: #{MyNameSpace.OldParent}
indexedType: #none
private: false
instanceVariableNames: 'myInstVar'
classInstanceVariableNames: ''
imports: ''
category: 'MyPackage'
change the second line from OldParent to NewParent:
Smalltalk.MyNameSpace defineClass: #MyClass
superclass: #{MyNameSpace.NewParent}
indexedType: #none
private: false
instanceVariableNames: 'myInstVar'
classInstanceVariableNames: ''
imports: ''
category: 'MyPackage'
and press Ctrl+S (or choose Accept from the text area's pop-up menu).
The class and all its instances will be migrated automatically.
HTH,
Steve
|