[Newbies] variableWordSubclass:

ncellier at ifrance.com ncellier at ifrance.com
Mon Jun 26 18:09:41 UTC 2006


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, which is a kind of Behavior.
  FloatArray class class.
  FloatArray class class superclass superclass.

If #new: is not implemented in (FloatArray class), it must be in one of the superclass.
  FloatArray class allSuperclasses.
You got an OrderedCollection(ArrayedCollection class SequenceableCollection class Collection class Object class ProtoObject class Class ClassDescription 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.

Nicolas
________________________________________________________________________
iFRANCE, exprimez-vous !
http://web.ifrance.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20060626/e4e7d83a/attachment.htm


More information about the Beginners mailing list