Viewing methods from superclass(es) 
Author Message
 Viewing methods from superclass(es)


> Is there any likelihood of this finding its way into Dolphin? Or is it
> already there but I haven't stumbled across it?

The equivalent behaviour is already there in the ClassHierarchyBrowser.

The class list context menu and main Class menu both include "Browse/All
Methods" which opens up a MethodBrowser on all the selectors that the
selected class responds to.

The method list shows a little icon when a method is overriding a method
further up the hierarchy. It's context menu has a couple of options,
"Hierarchy" and "Superclass Definition" that allow you to browse through the
super definitions. NB: You can sort the column containing the icon so that
all the overridden methods in a class are grouped together.

This all works in a slightly different way to the one you describe but is,
IMHO, just as good.   I seem to recall finding that the full list of methods
in one ListView could be a bit confusing at times - although that was in
ST/V which had no colour coding.


Tue, 13 Apr 2004 15:39:21 GMT  
 Viewing methods from superclass(es)

> In the version of Smalltalk I used to use (VW with some slightly
> nonstandard browser) I was able, when browsing a classes methods, to see
> the methods implemented by that classes superclasses as well. The names
> of these methods were, I think, a slightly lighter colour in the
> browser, to distinguish them from methods native to that class.

> This facility could be toggled on and off, and one could choose how far
> back into the inheritance tree to view all inherited methods (the
> default was everything but Object).

> I found this extremely useful, as I often want to know what a class
> does, rather than what it does which is unique.

> Is there any likelihood of this finding its way into Dolphin? Or is it
> already there but I haven't stumbled across it?

The forthcoming Dolphin 5 has this facility in its Class Hierarchy Browser
and the new System Browser. You can see a screenshot of the inherited method
stuff in action at As a matter of
interest, we use a method Color>>faded to "fade" the colours of the
inherited methods in the various lists in which they are displayed:

!Color methodsFor!

    "Answer a new color which is a faded copy of the receiver"
    | rgb |
    rgb := self asRGB.
        red: (255 - rgb red) // 2 + rgb red
        green: (255 - rgb green) // 2 + rgb green
        blue: (255 - rgb blue) // 2 + rgb blue! !

!Color categoriesFor: #faded!*-unclassified!public! !

For more info on what's in Dolphin 5 see my reply to Ian B's "Someone had to
ask" thread on 22 Sept 2001.

Best Regards,

Andy Bower
Dolphin Support
Are you trying too hard?

Tue, 13 Apr 2004 23:39:42 GMT  
 Viewing methods from superclass(es)

> Is there any likelihood of this finding its way into Dolphin? Or is it
> already there but I haven't stumbled across it?

Hi Steve

The exact requirements aren't in Dolphin but I modified the CHB to
incorporate a few extra commands when you right click on a class name and
choose 'browse'.
Under this menu I added :-

All Instance Methods
All Class Methods
Filter Superclass Methods

The first shows all inherited instance methods except from Object.
The second shows all inherited class methods except from Object.
The last allows you to select from a listbox which classes you wish to see
the inherited methods from.

I've created a package called chb1.
You just install it and then from System Properties change the default view
the CHB to 'ClassMethods'.

If you want to try it just e-mail privately and I'll send the package as an

Hope this helps.

Best wishes


Tue, 13 Apr 2004 19:03:36 GMT  
 [ 3 post ] 

 Relevant Pages 

1. Using methods in the superclass' superclass

2. Variable 'superclass'es?

3. Is it slower to call superclass methods ?

4. call to a superclass method

5. superclass method calling problem

6. Calling a (any) superclass method when already have one by that name

7. calling superclass' method with list positional arg

8. jython question: accessing protected superclass methods

9. Invoking a subclass's method on its superclass's instance

10. Calling superclass method with variable args?

11. How to inherit a subset of methods from a superclass

12. Which class/superclass implements a method ?


Powered by phpBB® Forum Software