[Cuis-dev] indexable objects

ken.dickey at whidbey.com ken.dickey at whidbey.com
Tue Sep 3 11:47:42 PDT 2024


On 2024-09-03 08:00, Mark Volkmann via Cuis-dev wrote:

> The at:put: method in the object class contains the comment "Assumes 
> receiver is indexable.".
> What does a class need to do to indicate that it is indexable? I 
> searched the Array class and all its superclasses, but the answer 
> wasn't apparent to me.

If you look more closely at the class definitions, you will note that 
they are not sending creating a class by sending a method
   
#subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
but sending the superClass something which has a specialized #subclass 
part:

   variableSubclass:
   variableByteSubclass:
   variableWordSubclass:
   variableDoubleByteSubclass:

The instantiating Class typically invokes #ClassBuilder methods.

The `implementors` button _is_ your friend!  :)

HTH,
-KenD


More information about the Cuis-dev mailing list