Hi! you're very right, the browser does not show this. Open a browser, look for the class ProtoObject. You can see that the superclass of ProtoObject is nil, but if you select the 'class' tab, you just see the declaration of instance variable names for the meta-class. This does not show you the superclass of the meta-class. In practice, this is not something that you need to know. Well, maybe for #new and #new: You need to open a workspace and type 'ProtoObject class superclass' to discover that it is Class. Cheers, Alexandre On 7 Oct 2009, at 16:32, Petr Vácha wrote:
I know Smalltalk hierarchy, I just wanted to point out, that Hierarchy Browser does not provide (maybe I am dumb, but I do not see any) obvious way to show the hierarchy to see that Array class inherits from Behavior.
PV.
----- PÅ®VODNà ZPRÃVA ----- Od: "Stéphane Ducasse" <stephane.ducasse@inria.fr> Komu: "Petr Vácha" <recycler@volny.cz> PÅedmÄt: Re: Hierarchy browsers & implementers of Datum: 7.10.2009 - 21:22:42
I suggest you to read the chapter on the Smalltalk model in the Squeak or pharo by example book the key is:
when you look for a message you look in the CLASS of the receiver then its superclasses.
So when you look for new sent to Array you should look in the Array class superclasses and you will see it contains Behavior before ProtoObject
Stef
PS: you can sent to the mailing-list just register to it. You do not need to have a google account.
On Oct 7, 2009, at 1:00 PM, Petr Vácha wrote:
Hi again, when try to find out that Array>>new: bug I found one thing that I
think may be very confusing - somehow mangled information from hierarchy browsers (see figure).
Array>>new: calls primitive and uses self>>basicNew: call as fallback.
Array does not implement basicNew: so I tried to find implementors of it. Behavior has this implementation. However, when you show hierarchy of Array, it ends in ProtoObject with no Behavior involved. I think this to be is somewhat confusing for beginners especially when they are trying to get into method lookup chain.
Petr Vacha
<pharo-browsers.jpg>
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.