Mess with obsolete classes???

Nathanael Scharli n.schaerli at gmx.net
Thu Feb 14 16:32:37 UTC 2002


Hi

I'm doing some experiments with a sort of mixins in Squeak, and therefore, I
had to add a new instance variable to the class 'Class'. Because of the
circular meta-structure of Squeak ('Class' is an instance of 'Class class',
which is again an (indirect) subclass of 'Class'), I had to patch the
ClassBuilder to make this work.

After I rebuilt the whole system, I checked whether all the classes and
metaclasses are in the right shape. Thereby, I noticed the following weird
thing about obsolete classes:

The Smalltalk dictionary contains some keys starting with 'AnObsolete...'
which point to classes. The first thing that is strange, is that the keys
are strings and not literals. But then the next question: Why are obsolete
classes stored in the system dictionary? (Doesn't the definition of an
obsolete class say that it should not be there?).
Looking at one of these classes (e.g. 'AnObsoleteSoundTile') shows that the
sending the message 'isObsolete' yields 'false'. (This makes sense, because
the name is stored in the system dictionary, but it is somewhat
counter-intuitive because of the class name). Then I inspected the
superclass, which is 'AnObsoleteTileMorph'. This class is really obsolete,
because it is not stored in the system dictionary. However, the weird thing
is that this class does not appear as an obsolete subclass of its
superclass!! In fact, the superclass is 'RectangleMorph', but
'RectangleMorph obsoleteSubclasses' does not include this class. But since
this class is also not a regular subclass of 'RectangleMorph' (it is not
included in 'RectangleMorph allSubclasses'), this means that the class
hierarchy is not conistent!!!

Can anybody explain me this phenomenon? I would be really curious wheter
there is a good reason why these 'AnObsolete...'-classes are stored in the
system dictionary and why the class hierarchy is inconsistent for these
classes.

Thanks for your help,
Nathanael

PS: I've encountered these problems in a fresh Squeak3.2a image (latest
change 4646).




More information about the Squeak-dev mailing list