[Newbies] variableWordSubclass:

ncellier at ifrance.com ncellier at ifrance.com
Mon Jun 26 18:19:10 UTC 2006

Sorry to repost, my webmail interface was using html instead of plain text...

To understand a little bit more:

When you execute (FloatArray new: 2), you send message #new: to class FloatArray with argument 2.

Message #new: is looked up in the receiver class methodDictionary, that is (FloatArray class) here.

Note that (FloatArray class) is a an instance of Metaclass:
FloatArray class class.
which is a kind of Behavior:
FloatArray class class superclass superclass.

If #new: is not implemented in (FloatArray class), it must be in one of its successive superclasses.
FloatArray class allSuperclasses.
You get
an OrderedCollection(ArrayedCollection class SequenceableCollection class Collection class Object class ProtoObject class Class ClassDescrip tion Behavior Object ProtoObject)

What is causing you trouble is that the hierarchy browser is hiding this hierarchy...
>From the Browser,
FloatArray browseHierarchy.
you can only see:
FloatArray allSuperclasses.
And this one only show you a HierarchyBrowser on Metaclass:
FloatArray class browseHierarchy.

I remember from a browser showing the whole Metaclass hierarchy once...
(was it parcplace st-80 v2.3 ?).
Maybe it would help newbies understand better this subtle part of Smalltalk.

Hope it helps.


iFRANCE, exprimez-vous !

More information about the Beginners mailing list