Well if the class does not exists it calls the method on UndefinedObject
(UndeclaredBinding). And you have:

UndefinedObject>>subclass: nameOfClass
instanceVariableNames: instVarNames
 classVariableNames: classVarNames
poolDictionaries: poolDictnames
category: category
 "Calling this method is now considered an accident.  If you really want to
create a class with a nil superclass, then create the class and then set
the superclass using #superclass:"
 self traceCr: ('Attempt to create ', nameOfClass, ' as a subclass of nil.
 Possibly a class is being loaded before its superclass.').
^ProtoObject
 subclass: nameOfClass
instanceVariableNames: instVarNames
classVariableNames: classVarNames
 poolDictionaries: poolDictnames
category: category

The best is to set manually the superclass after with #superclass:


2013/12/2 Stéphane Ducasse <stephane.duca...@inria.fr>

> Hi
>
> when I load a class whose superclass is not in the image I have the
> impression that the system create a subclass from ProtoObject
> and I would like to be able to control the superclass.
>
> ProtoObject subclass: #Adaptor1Example
>         instanceVariableNames: 'customers accountID address name
> phoneNumber'
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Examples-Cookbook'
>
> Any idea where to look?
>
> Stef
>

Reply via email to