views:

279

answers:

3

I'm familiar with the VisualWorks and Dolphin versions of Smalltalk, but have not previously used Squeak. I'm just familiarising myself with Pharo, which is a 'cleaned up' fork of Squeak.

I'm used to having the facility in the Class Browser to show either only the methods implemented by a class or both the methods inherited and the methods implemented.

Is this useful facility missing in Squeak, or have I just been unable to find it?

+1  A: 

You can double-click on any class to open a Hierarchy Browser on that particular class. The hierarchy button in the toolbar and the menu entry browse hierarchy (Ctrl+H) open the same view.

There is the Inheritance Browser that shows you the hierarchal implementations of the currently selected method. Click on the inheritance button in the toolbar.

Furthermore there is the Protocol Browser that displays all methods and super methods of a class together. To open this browser select browse protocol (Ctrl+Shift+P) in the context menu of the class.

Lukas Renggli
Just checking that we're talking about exactly the same thing here - what I'd like to do is (when examining ArrayedCollection for instance) see *one* pane which lists methods such as isSorted from ArrayedCollection and also methods such as allButFirst from the parent class SequencableCollection (ideally in greyed out form, to show it's not implemented on the current class). Is that also your understanding of what I'm asking?
teapot7
> You are the first one to miss that functionality in several years now.Which just shows how differently people work - for me it's a critical feature. It will probably do me good to try an reimplement it in my personal copy.
teapot7
@teapot7 I assume Lukas misunderstood you. What he refers to is displaying a hierarchy in the class pane, what you want is to see inherited methods in the method pane. Me too I miss that.
Adrian
+2  A: 

If you want to build a browser with that behaviour, you should take a look at the Glamour browser construction DSL.

I personally do not feel the need to see all 34 pages of method names defined in ProtoObject and Object, or the 5 pages of method categories. Object methods size prints 421.

Stephan Eggermont
Thanks for the tip on the Glamour browser - by coincidence I heard of it for the first time two days ago, and it sounds excellent.As for seeing all two zillion methods implemented on Object - I seem to recall that VisualWorks (or was it Dolphin?) allows you to see methods implemented on all methods implemented on superclasses *below* the level of Object - definitely something you'd want to be able to do.A fuzzier memory tells me I've seen a browser where you can pick the level at which it starts showing ancestor methods, which is even better.
teapot7
Ok, that sounds a bit more practical
Stephan Eggermont
Visualwork defaults to showing everything below `Object`, and you can change that to any superclass. I guess showing everything below `Object` should be fine enough.
Adrian
A: 

AFAIK in the GemStoneTool there is such a thing, thre is a 1 or so and a # which seems to change the view to see all the methods available in a class (be it inherited or in the class itself) I'm as amazed as you that nothing like that exists in "standard images". Maybe the users know the libraries for ages, and maybe they remember enough to not bother. ....

Friedrich