
Change superclass at runtime
Quote:
> Hi,
> is there a method available to change the superclass of a class that
> avoids cyclic inheritance or how can I check cyclic inheritance before
> I send setSuperclass: to a certain class?
> I use VW7.1
User-level class modifications are normally done by ClassBuilder, so there
is no such public method. The check is hidden inside ClassBuilderRecord,
but it is trivial to do by yourself. If you assume that there is no
circularity at the start, then the only class that can introduce it is the
one you are about to change--meaning the test is
newSuperclass withAllSuperclasses includes: aClass
--
Vassili Bykov [|] vassili "at" parcplace "dot" com
VisualWorks Engineering, Tools Technical Lead
[:s | s, s printString] value: '[:s | s, s printString] value: '