home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
APPBRWSR.ZIP
/
APPBRWSR.DOC
< prev
next >
Wrap
Text File
|
1992-02-02
|
13KB
|
305 lines
TK's Application Browser(c)
by
Thomas Koschate
(c) 1992
Thomas Koschate
Brampton, Ontario, Canada
0.0 Introduction
I came to Smalltalk relatively recently (November, 1991) from
another object-oriented environment, and realized I'd come home.
However, there were one or two pieces missing in Smalltalk that I
missed from that other environment. One of these was referred to
there as a "Project Browser", but many Smalltalkers referred to
"Applications Browsers", so there you are.
All I really wanted out of an application browser was a browser
that would allow me to group together the classes that I'm
currently using to put together an application for ease of
reference. I know there's a Goodies pack, but it's for
Smalltalk/V DOS, and I didn't know whether a port would even be
feasible. Besides, what better way to really get one's feet wet
in Smalltalk?
Along the way, I picked up a couple of other treasures. The
Recent Classes option, that keeps a history of recently browsed
classes for instant jump back, is based on Dan Goldman's code
from a recent issue of SCOOP (although I did tweak it a bit, and
enhance its application). The BookMark option allows one to save
one's place in the browser, and jump back to it with one
keystroke. It is something I saw in that other environment, and
decided to implement in Smalltalk.
Important Note: This browser was written for Smalltalk/V PM. I
have no idea whether or not it will work with Smalltalk/V for
Windows. There is no particular reason why it shouldn't, but you
will have to register to get the source code to find out.
1.0 Installation
1.1 Before Installing
TK's Application Browser(c) will add a subclass to the
ClassHierarchyBrowser. It assumes that the ClassHierarchyBrowser
is as distributed by Digitalk. If you have changed it, such as
by installing the Recent Classes option, you will not be able to
install this version of the browser. Try the installation on
virgin image - if you like the browser enough to register (see
below), it won't be a problem.
TK's Application Browser(c) will also add one new class method to
TextPane, and two instance methods, as well as replacing the
instance method #buildMenuBar in the class ApplicationWindow.
Again, if you have changed any of these classes, the installation
may fail.
1.1 Physical Installation
Installing TK's Application Browser(c) is easy. The first step
is to copy the file APPBRWSR.DLL to the same directory as your
other Smalltalk DLL's. Then, get into Smalltalk, and close down
all your windows until just the Transcript is open. Do a
File/Open, switch to the DLL directory, and Install the the
APPBRWSR.DLL.
After installing, every time you open a new window, a new menu
item, Applications, will appear on the window's menu bar.
2.0 Usage
2.1 Applications Menu
The Applications menu contains three options, Select, Remove and
About TK's Application Browser.
2.1.1 Applications/Select
The Select option allows the selection or creation of an
application. It pops up a dialog containing a ComboBox that
allows one to choose from a menu of existing applications, or to
type in a new application name. Double clicking a selection,
hitting enter on a selection, or pressing the OK button after a
selection all have the same effect. If the application is new. A
confirmation dialog box will appear, and then TK's Application
Browser(c) will open.
2.1.2 Applications/Remove
The Remove option pops up a dialog containing a ListBox of all
available applications. Removing an application only removes the
entry from the Applications dictionary. THE CLASSES THEMSELVES
ARE NOT AFFECTED. Confirmation is required before the
application is removed.
2.1.3 About TK's Application Browser
This is nothing more exciting than a statement of copyright. The
registered version does not include this menu option.
2.2 TK's Application Browser(c)
As you might expect, TK's Application Browser(c) looks and
functions much like a Class Hierarchy Browser with some
exceptions. The Class pane is sorted alphabetically, with no
hierarchy indentations, the Applications menu has an additional
option, and the Classes menu has several new options.
2.2.1 Applications/File Out
The Applications/File Out option will file out all the classes
participating in an application into a single file. This eases
the process of moving an application to a new image. Note that
the classes are filed out in alphabetical order. It is possible
that if participating classes are subclasses of each other, the
subclass may appear in the file before the superclass, which
would cause an error when installing the file. The only solution
right now is to manually edit the file.
2.2.2 Classes
The new features of the Classes menu are intended to support the
additional requirements of TK's Application Browser(c), and to
add some productivity features. Only variations from the Class
Hierarchy Browser are discussed.
2.2.2.1 Classes/Include
As an application is being built, existing classes can be
included in the Browser by use of this option. A dialog box with
a multiple selection ListBox containing all the classes in
Smalltalk will pop up, allowing as many classes as desired to be
included.
2.2.2.2 Classes/Add Subclass
This option performs in the same manner as in the Class Hierarchy
Browser, except that only classes in TK's Application Browser(c)
can be subclassed, and they are displayed in the Class pane
alphabetically after creating.
2.2.2.3 Recent Classes
Based on the Dan Goldman's code, Recent Classes pops up a menu of
the last fifteen classes browsed, from most recent to least
recent. Changes I have made to Dan's code include limiting the
number of classes in the history, and adding classes visited
using the Find option.
2.2.2.4 Set Bookmark
Setting a bookmark will record the current class and method being
browsed, as well as the whether instances or classes are being
browsed. This allows one to go exploring, yet still return
instantly to a known spot.
2.2.2.5 Jump to Bookmark
If a bookmark has been previously set, jumping to a bookmark will
restore the browser to the class, method, and instance/class
state where the bookmark was set.
2.2.2.6 Exclude Class
This will remove the currently selected class from the set of
those participating in the application. It does not remove it
from the image.
3.0 Known Problems
The Recent Classes option will occasionally induce a Walkbalk.
This appears to be a problem within Smalltalk itself, possibly in
the Menu class. It is non-fatal. Just close the Walkback window
and try again.
Application names are currently restricted to 32 characters.
This is due to a bug in the implementation of the ComboBox class;
Digitalk did not include all the methods to which ComboBoxes will
respond, such as the setting of maximum text size. Registered
versions of TK's Application Browser(c) include details on how to
fix it, and do not have this limitation.
As stated above, Application Fileouts will not necessarily
install properly without manual editing. A future release will
likely deal with this.
4.0 Registration
4.1 Why Register?
Registration of this browser, using the form below, entitles you
to complete source code for the browser, as well as the necessary
modifications to add Recent Classes and Bookmark functionality to
the ClassHierarchyBrowser. In addition, fixes and enhancements
for a period of one year will be provided free of charge.
4.2 What does it cost?
The cost is a mere US$25.00, or CDN$30.00, payable in cash, money
order, or cheque. Canadian residents, please add 7% G.S.T.
(CDN$2.10), and Ontario residents, 8% P.S.T. (CDN$2.40).
5.0 Warranty and Disclaimer
TK's Application Browser(c) is provided "as is". No warranty is
offered, either express or implied. No responsibility for loss
or damage will be accepted in any way, shape or form!
6.0 Licence
This software may be freely used for non-commercial purposes. It
may not be re-sold, but may be freely distributed in its
original, unmodified form. The software may not be sold, or
included in a package for resale without the author's explicit,
written consent.
7.0 Support
Support is available electronically through several networks:
Internet: tom.koschate@rose.uucp
Bix: tkoschate
CompuServe: 76214,1034
Or by mail:
Thomas Koschate
54 Mill Street South
Brampton, Ontario
L6Y 1S6
ORDER FORM
for
TK's Application Browser
Send this form with payment to:
Thomas Koschate
54 Mill Street South
Brampton, Ontario
L6Y 1S6
Canada
Name: _________________________________________________________
_________________________________________________________
Address: ______________________________________________________
______________________________________________________
______________________________________________________
City: ______________________ Province/State: _________________
Postal Code/Zip Code: ________________________
Country: _____________________________________
I am enclosing $___________ for ____ copies of TK's Application
Browser at cost of US$25.00, or CDN$30.00, payable in cash, money
order, or cheque per copy. (Canadian residents, please add 7%
G.S.T. (CDN$2.10), and Ontario residents, 8% P.S.T. (CDN$2.40).)
Please ship on _____ 3.5" disks or ______ 5.25" disks.