kww@cs.glasgow.ac.uk (Mr Kevin Waite) (09/09/88)
The following chunk of Smalltalk provides a facility that I find useful to leave
lying around in my System Workspace. Given a Class Category name (in this
example it is 'DataType-Tools') all the methods belonging to classes in this
category that have NO senders are collected. A method browser is then opened
on this collection. This provides a convenient way of discovering old, obsolete
methods which can be browsed and removed if required. Note however that the
utility is very slow. The utility was developed under ParcPlace V2.2.
("Click inside the bracket to browse all unused methods in the given category."
| classNames classes unused senders |
classNames _ SystemOrganization listAtCategoryNamed: 'DataType-Tools' asSymbol.
classes _ classNames collect: [:className | Smalltalk at: className].
unused _ SortedCollection new.
classes do: [:cl | cl selectors do: [:sel |
senders _ Smalltalk allCallsOn: sel.
senders size = 0 ifTrue: [unused add: cl name , ' ' , sel]]
].
BrowserView openListBrowserOn: unused
label: 'Methods with no senders'.)
---------
Puzzle: Why are there so few postings of useful classes and goodies to this
group? I thought the whole idea was to share code. :-)
--
---------
Kevin Waite: kww@cs.glasgow.ac.uk
Department of Computing Science, University of Glasgow.
17 Lilybank Gardens, Glasgow, United Kingdom, G12 8RZ.
ns@cat.cmu.edu (Nicholas Spies) (09/11/88)
I just got ParcPlace Smalltalk-80 V2.3 and would like any sage words of advice on the most efficient way to learn the language. I have Adele Goldberg's books, 'A Little Smalltalk' (perhaps useful), an OOP-Smalltalk by Pinson and ??, and Krasner's 'Green' book. 'A Taste of Smalltalk' is on order. Any others? It is unclear to me whether Smalltalk is useful for actual applications, as opposed to building working models of applications. (Even with my limited exposure, I am impressed with the Smalltalk programming environment and the ease with which it can be modified; I've just never seen a large Smalltalk application and how it performs...) Although it seems to be almost trivially easy to build variations on Smalltalk system tools (browsers, etc) is it as relatively easy to define, say, a different type of user interface (say, one that looks more like a Mac application). Is it possible, and practical, to draw graphics into a bitmap and install them in a scrollable View? (I am using a Mac II, which runs Smalltalk a little faster than a Xerox Dorado.) Any advice would be greatly appreciated! -- Nicholas Spies ns@cat.cmu.edu.arpa Center for Design of Educational Computing Carnegie Mellon University