find all methods tat use a class (was: squeak graphic: technical introduction)

Boris Gaertner Boris.Gaertner at gmx.net
Mon Jul 28 06:49:17 UTC 2003


Martin Kuball <MartinKuball at web.de> asked:

> Another question: I'm looking for a way to find all methods tat use a
class.


Please try this:
1. open a browser and select the class you are interested in.
2. In the view that shows the class names, bring up the
menu and select 'class refs (N)'

You will be given a new window titled 'Users of '<class name>
The number in the square brackets indicated the number of methods
found. When you select a method, the first occurrence of the
class name will be highlighted, but occasionally it is in a comment.
In this case you will have to look for the first occurrence in the
method text itself.


> Using in the sense of calling class methods especially new. I tried
> Smalltalk browseMethodsWithSourceString: 'class name'
> but it's low and finds more than I want.

When you want to see the senders of a method with a given
name, you can do the following:
1. In a brwoser, select a method that has the desired name.
2. In the view that shows the method names, bring up the menu
and select the option 'senders of ...'
3. A new menu will pop up. The menu displays a collection of
method names. (The name of the selected method itself and the
names of all methods that are used in the selected method)
4. Select one method name.

 You will be given a new window titled 'Senders of ' <method name>
(Occasionally, a prompter will be shown to tell you that there are
no senders of the selected method)

Hope this helps
Boris




More information about the Squeak-dev mailing list