Download The Smalltalk Environment, August 1981, BYTE Magazine

Transcript
The Smalltalk Environment
Larry Tesler
Apple Computer Inc
10260 Bandley Dr
Cupertino CA 95014
As I write this article, I am wearing aT-shirt (photo 1)
given to me by a friend . Emblazoned across the chest is
the loud plea:
DON'T
MODE
ME IN
Surrounding the caption is a ring of barbed wire that
symbolizes the trapped feeling I often experience when
my computer is "in a mode."
In small print around the shirt are the names of some
modes I have known and deplored since the early 1960s
when I came out of the darkness of punched cards into
the dawn of interactive terminals. My rogues' gallery of
inhuman factors includes command modes like INSERT,
REPLACE, DELETE, and SEARCH, as well as that inescapable prompt, "FILE NAME?" The color of the silk
screen is, appropriately enough, very blue .
My friend gave me the shirt to make fun of a nearfanatical campaign I have waged for several years, a campaign to eliminate modes from the face of the earth-or
at least from the face of my computer's display screen. It
started in 1973 when I began work at the Xerox Palo Alto
Research Center (PARC) on the design of interactive
systems to be used by office workers for document
preparation. My observations of secretaries learning to
use the text editors of that era soon convinced me that my
beloved computers were, in fact, unfriendly monsters,
and that their sharpest fangs were the ever-present
modes. The most common question asked by new users,
at least as often as "How do I do this?, " was "How do I
get out of this mode?" Other researchers have also condemned the prevalence of modes in interactive systems
for novice users (reference 1) .
Novices are not the only victims of modes. Experts
often type commands used in one mode when they are in
another, leading to undesired and distressing consequences . In many systems, typing the letter "0" can have
meanings as diverse as "replace the selected character by
0," "insert a 0 before the selected character, " or "delete
the selected character." How many times have you heard
or said, "Oops, I was in the wrong mode"?
Preemption
Even when you remember what mode you are in, you
can still fall into a trap. If you are running a data-plotting
program, the only commands you can use are the ones
provided in that program. You can't use any of the useful
capabilities of your computer that the author of the program didn't consider, such as obtaining a list of the files
on the disk. On the other hand, if you're using a program
that lets you list files, you probably can't use the text
editor to change their names. Also, if you are using a text
editor, you probably can't plot a graph from the numbers
that appear in the document.
If you stop any program and start another, data
displayed by the first program is probably erased from
the screen and irretrievably lost from view . In general,
"running a program" in most systems puts you into a
mode where the facilities of other programs are
unavailable to you. Dan Swinehart calls this the dilemma
of preemption (reference 2).
Many systems feature hierarchies of modes . A portion
of a typical mode hierarchy is shown in figure 1 . If you
are in the editor and want to copy text from a file, you
issue the copy-from command and it gives the prompt
"from what file?" You then type a file name. What if you
can't remember the spelling? No problem. Leave fromwhat-file mode, leave copy-from mode, save the edited
text, exit from the editor to the executive, call up file
management from the executive, issue the list-files command, look for the name you want (Hey, that went by
too fast. Sorry, you can't scroll backwards in that
mode.), terminate the list command, exit from file
management to the executive, reenter the editor, issue the
copy-from command, and when it prompts you with
"from-what-file?," simply type the name (you haven 't
Photo 1: The "DON'T MODE ME IN" T-shirt.
90
August 1981 © BYrE Publications Inc
Circle 269 on inquiry card.
--+
forgotten it, have you?) .
You don 't have to be a user-sympathizer to join the
campaign against modes. The most coldhearted programmer is a victim as well. Say you have programmed a new
video game for your personal computer and have encountered a bug. An obscure error message appears on
the screen mixed in with spacecraft and alien forms . To
see the latest version of the program on the screen, you
have to wipe out the very evidence you need to solve the
problem. Why? Because the system forces you to choose
between edit mode and execute mode . You can't have
both.
Enter the Integrated Environment
Soon after I began battling the mode monster, I became
associated with Alan Kay, who had just founded the
Learning Research Group (LRG) at the Xerox P ARC. Kay
shared my disdain for modes and had devised a userinterface paradigm (reference 3) that eliminated one kind
of mode, the kind causing the preemption dilemma . The
paradigm he advocated was called "overlapping windows."
Most people who have used computer displays are
familiar with windows. They are rectangular divisions of
the screen, each displaying a different information set. In
some windowing systems, you can have several tasks in
progress, each represented in a different window, and can
switch freely between tasks by switching between windows.
What is a
CLOCALPEEP?
Another name for
the CCB-", which is:
• a clock
hour, minute, second
• a calendar
day, day of week,
month, year
The trouble with most windowing systems is that the
windows compete with each other for screen space-if
you make one window bigger, another window gets
smaller. Kay's idea was to allow the windows to overlap .
The screen is portrayed as the surface of a desk, and the
windows as overlapping sheets of paper (photo 2). Partly
covered sheets peek out from behind sheets that obscure
them. With the aid of a pointing device that moves a cursor around the screen, you can move the cursor over a
partly covered sheet and press a button on the pointing
device to uncover that sheet.
The advantages of the overlapping-window paradigm
are:
• the displays associated with several user tasks can be
viewed simultaneously
• switching between tasks is done with the press of a button
eno information is lost switching between tasks
e screen space is used economically
Of course, windows are, in a sense, modes in sheep's
clothing. They are more friendly than modes because you
can't slip into a window unknowingly when you are not
looking at the screen, and because you can get in and out
of any window at any time you choose by the push of a
button .
Kay saw his paradigm as the basis for what he called an
"integrated environment." When you have an integrated
environment, the distinction between operating system
and application fades. Every capability of your personal
computer is always available to you to apply to any information you want. With minimal effort, you can move
among such diverse activities as debugging programs,
editing prose, drawing pictures, playing music, and running simulations. Information generated by one activity
can be fed to other activities, either by direct user interaction or under program control.
When Kay invented the Small talk language in 1972, he
designed it with the ability to support an integrated en-
• an audio alarm
All on one board for your
TRs-ao Model II
It includes a pacemaker battery which will
give over 8 years of continuous timekeeping.
From the fo lks who brought you the be st
CP/ M'" for the Model II.
$175 plus shipping
Prepaid, COD, Mastercharge orVisa orders
accepted. California residents add 6%
sales tax.
TRS'80 is a trademark of Tandy Corp.
CP/M IS a reg is tered trademark of DIg Ita l Research Inc
Warni ng: In stallation requires ope ning the M ode l II , which may void its
war ranty. We suggest th at you wait until the warranty period has expired
before install ing th e CCB-II.
Figure 1: A portion of a typical mode hierarchy.
94
August 1981 © BYTE Publications Inc
Circ le 310 on inquiry card.
vironment. The implementations of Small talk produced
by Dan Ingalls and the other members of the Learning
Research Group have achieved ever-increasing integration . The file system, process-management system,
graphics capability, and compiler are implemented
almost entirely in Smalltalk. They are accessible from
any program, as well as by direct user interaction.
In recent years, the idea of an integrated environment
has spread outside the Learning Research Group and even
to non-Small talk systems. The window-per-program
paradigm is now commonplace, and many system
designers have adopted the overlapping-sheet model of
the screen.
In summary, the term environment is used to refer to
everything in a computer that a person can directly access
and utilize in a unified and coordinated manner. In an integrated environment, a person can interweave activities
without losing accumulated information and without giving up capabilities.
Strengths of Small talk
Before delving further into the nature of the Smalltalk
environment, we should first discuss its purpose.
Many general-purpose programming languages are
more suitable for certain jobs than others. BASIC is easy
to learn and is ideal for small dialogue-oriented programs . FORTRAN is well suited to numerical applications. COBOL is tailored to business data processing.
Pascal is good for teaching structured programming .
LISP is wonderful for processing symbolic information.
APL excels at manipulating vectors and matrices . C is
great for systems programming . SIMULA shines at
discrete simulations. FORTH lets people quickly develop
efficient modular programs on very small computers .
All these languages have been used for numerous purposes in addition to those mentioned. You can write
almost any program better in a language you know well
thim in one you know poorly. But if languages are compared from a viewpoint broader than that of a narrow
expert, each language stands out above the others when
used for the purpose for which it was designed.
Although Small talk has been used for many different
applications, it excels at a certain style of software
development on a certain type of machine . The machine
that best matches Small talk's strengths is a personal computer with a high-resolution display, a keyboard, and a
pointing device such as a mouse or graphics tablet (photo
3a). A cursor on the screen tracks mouse movements on
the table so you can point to objects on the screen . The
mouse (reference 4) has one or more buttons on its top
side (photo 3b). One button is used as a selection button.
If there are more buttons, they are normally used as
menu buttons .
If the machine has a high-performance disk drive, you
can use a virtual-memory version of Smalltalk and have
as little as 80 K bytes of main memory, not counting
display-refresh memory. Otherwise, you should have at
least 256 K bytes of memory. This much memory is required because the whole integrated environment lives in
one address space. It includes not only the usual run-time
language support, but window-oriented graphics, the
LINE VOLTAGE
TRANSIENT CLIPPING
Features Parallel Operation
5000 Hits/Second
PROTECTS:
PROTECTS AGAINST:
-Computers
- Micro-Computer Systems
-Word Processors
-Cash Registers
-Power Supplies
-Hig~
D'l~u~,~,s
Energy Voltage
Transients
-On-Off Switching
-Lightning Induced Transients
-Inrush of On/Off Power
678F
TRANSI E NT VO LTAGE
SURG E SUPPRE SSO R
®
LISTED
Dealer Inquiries invited.
7133 Rutherford Rd. Baltimore, Md. 21207
(301) 298-3130
800-638-9098
96
August 1981 © BYTE Publications Inc
Circ le 123 on inq uiry ca rd.
Photo 2: A typical Smalltalk display . Th e various "windows"
look and behave like overlapping sheets of paper.
FREE
Computer
editor, the compiler, and other software-development
aids . The programs you write tend to be small because
they can build on existing facilities; no system facilities
are hidden from the user. Users of LISP and FORTH will
be familiar with this idea.
Small talk supports its preferred hardware by incorporating software packages that provide:
Forms
Catalog
• output to the user through overlapping windows
.input from a keyboard, a pointing device, and menus
.uniform treatment of textual, graphical, symbolic, and
numeric information
These interactive facilities are utilized heavily by the
built-in programming aids and are available to all userwritten applications.
The style of software development to which Small talk
is oriented is exploratory. In exploratory development, it
should be fast to create and test prototypes, and it should
be easy to change them without costly repercussions.
Small talk is helpful because :
with 32 pages of
continuous
business forms for
small computer
systems
• The language is more concise than most, so less time is
spent at the keyboard.
Send today for our NEW full color 32
page catalog with programming guides,
prices and order forms for continuous
checks, invoices, statements, envelopes,
stock paper and labels.
• Quality products at low prices
• Available in small quantities
• Fast Service
• Money Back Guarantee
• Convenient TOLL·FREE ordering
Fast Service by mail or, • .PHONE TOLL FREE
1 + 800·225·9550
Mass. residents 1 + 800·922·8560
8:30 a.m. to 5:00 p.m. Eastern Time Monday - Friday
r: ---------....
Please rush a new computer forms catalog to:
CODE 20460
I
I
I
I
I~~~
I
Name
Street
I
City, State and Zip
I-Pho~ne--~----------------I
I
•~
=: -
I
Computer make & model
-
- -
Nebs.J
•78COitijJiiter
f\lrmS
HollisSlreel, Grolon, Mass. 01471
A division 01 New England Business Service, Inc.
98
August 1981 © BYTE Publications Inc
Ci rc le 266 on inquiry ca rd.
Photo 3: A typical Smalltalk system (photo 3a) and a close-up of
the "mouse" (photo 3b) , a device that allows you to move an
on-screen cursor and select certain options.
.The text editor is simple, modeless , and requires a
minimum of keystrokes .
• The user can move among programming, compiling,
testing, and debugging activities with the push of a
button.
.Any desired information about the program or its
execution is accessible in seconds with minimal effort.
• The compiler can translate and relink a single change
into the environment in a few seconds, so the time usual ly wasted waiting for recompilation after a small program modification is avoided.
.Smalltalk programs grow gracefully . In most environments, a system gets more difficult to change as it
grows . If you add 2 megabytes of virtual memory to the
Small talk environment, you can fill the second megabyte
with useful capabilities as fast as you can fill the first.
• The class structure of the language prevents objects
from making too many assumptions about the internal
behavior of other objects (see David Robson 's article ,
"Object-Oriented Software Systems," on page 74 of this
issue). The programmer can augment or change the
methods used in one part of a program without having to
reprogram other parts .
The window is shown as a framed rec't angular area
with a title tab attached to its top edge. The program
associated with the window must confine its output to the
framed area .
Every window has a window menu (photo 4a) . The
window menu includes commands to reframe the window in a new size and location, to close the window, to
print the contents of the window on a hard-copy device,
and to retrieve windows hidden under it.
A window is tiled by one or more panes, each with its
own pan e menu (photo 4b). The pane menu includes
commands appropriate to the contents of that pane . In
Sc ro ll
Bar
Sc r o ll
Pon e
Po ne
Bar
Wind ow
p op-up
me nu
S c ro l l
Ba r
Pan e
The Anatomy of a Window
Over the years, members of the Learning Research
Group have embellished Kay's original window concept.
Let us look at a Small talk window in more detail (figure
2) .
Features:
•
•
•
•
•
•
•
•
•
•
•
Highest quality 480x512x8 digital video image
Input capability from 1V cameras or other sources
Variety of synchronization choices
2 selectable video A I D conversion circuits
Choice of 1, 2, 4, 8, 16 or 24 bits per pixel
32K·byte image memory on the basic system
64K, 1281{, 192K and 256K-byte system capacity
High resolution lightpen input
Photographic trigger control input
Software selectable system parameters
Stand-alone intelligent graphics unit with universal interface
Accessories:
• RGB color monitor
• High performance lightpen
480)( 51 2 Computer.generated
240)( 256 Digitized image.. 16 levels
ROBOTICS·AUTOMATED COUNTING AND MEASURING-QUALm' CO NT ROL MONITORIN GPATIERN RECOGNITION-IMAGE PROCESSING -MEDICAL AND SCIENTlFlC RlESEARCH
100
August 1981 © BYTE Publications Inc
•
DIGITAL
GRAPHIC
SVSTEMS
• Hard copy printer/ plotter
• Software packages available
935 Industrial Avenue
Palo Alto, CA 94303
(415) 856-2500
Circle 11 3 on i nqui ry c ard _
addition, a pane has a scroll bar on its left side used to
scroll the contents of the pane when more information exists than fits in the frame at one time.
Although you can see many windows and panes at
once, you can interact with only one pane at a time. That
pane and its window are said to be awake or active. To
awaken a different pane of the same window, move the
cursor over the new pane (photo 4c). To awaken a different window, move the cursor over the new window
and press the selection button on the pointing device
(photo 4d). When a window wakes up, its title tab and all
(4a)
pane; of a. [WO
Tru?; window tv,J,S 1'+ Mlindoul
.ml:nrJ a.r!a ea(.h. pa.nt'; has a.
s~lf
, 'fn1-rrtr:, '
,G olif.\.ps~. \1'
,rirIepa.ra'
r~'j,.M
ri'i lm .u.
'growinq'
,,:,xIf fl<1-1]i
'p(:tn.:.s'
'r.: mr4ml':"
Nor.e rJu1-r. lin(\s of re:x:[ tJ!"\?{.l.R llr
spll(.es (.\.\.(.f.oma.flca.tly.
'ml(
'\ '\1 rt'.1tM:.'
its panes are displayed, and it is no longer covered up by
other windows .
The scroll bar of the active pane is called the active
scroll bar. Its menu and the menu of its window are called
the active menus. In order to reduce screen clutter and
maximize utilization of precious screen space, no inactive
scroll bars or menus are displayed. On machines that use
a pointing device with three buttons, some versions of
Small talk even hide the active menus until one of two
menu buttons is pressed, at which time the associated
menu pops up and stays up until the button is released . If
the button is released when the cursor is over a command
in the menu, that command is executed (photo 4e) .
Modeless Editing
The overlapping-window paradigm helps eliminate
preemption. It can also reduce the need for certain
prompts and their associated modes. For example, you
never have to type the name of a procedure you want to
examine . At worst, you point to its name in a list; at best,
the desired procedure is already in a window on the
screen, and you activate that window ..
Unfortunately, overlapping windows do not eliminate
command modes like "insert" and "replace" by
themselves. Between 1973 and 1975, I worked at PARe
with various collaborators, including Dan Swinehart and
Timothy Mott, to banish command modes from interac(4d)
tS tn
pane of (.I, rwon'te window has (.I,
self
'fra.me'
' colla.pS~d '
'rtrlepaf'(.l,'
'growing'
',::xtrflag '
'pl1-neS '
, 'r.:.rnpla.r('.s'
'r irIe
' \ ',1 nablr:.s'
!,i'fl";nU
Wifidcrw
(.I,nt1 ell(.hpn.nt'; has
(.I
r~m{.
l et
A window rrta.1) tvwe any n.u.rrwer
panes. btl( berween one ana SIX are ty pical .
IIJtntlOllJ.
m l~rUi.
,t.,
Of
pani? (an con.rai.n l10rh texr and graptucs.
\Vt'IHI f1
\!'tnaoH! is un,;ovcrect, aU its panes
rc,1\s pl'A tJ rt'u: lr conrems.
,~.
II':., )
,:,lTl ,1rnln,)i' rt'te ,1e'; krop btl chanqinq rh(
St::': '; ,In,! I'K,HtOn:; Of H'tnltOHlS. ·
..
Of a. tWO WIndow.
win.dow has a. window
mm.rJ and.
e~h.
paM has a
rml~m.r.n.rJ .
'growi':cl '
'exi.rftag
'pa.n~s '
Note rhat lmes
wont
remplar'3s'
'ririe
..
'va riableS'
sp~es
Of teXt break
au.wmaricau.y .
ar
t1t
.... 1 "I'
I
'lll ,(j)lt,L1n
[-'orl, r, , r ,1' ,,\ 'Jr,lptlt(S .
.{'ll:. tOlP 1:- Illt, ' 1)
l! ' j '! ,lq { {Ill (O n fl· l!t ':· .
",4fl> '1 I
jl
".
'\
• ' . It · P ili·
~:.
,II1· ttlt
••
Irs P(Hlt~ S
rip .
'Itl', ! t ••
't '
; t
Photo 4: Windows and th eir behavior.
102
August 1981 ©
BYTE Publications Inc
Circle 165 on inquiry card. - - .
tive systems. Despite initial skepticism, nearly all users of
our prototypes grew to appreciate the absence of modes.
The following techniques were devised by us to eliminate
modes from text editing. They are analogous to the
techniques used to keep Polish-notation calculators
relatively mode-free. Similar techniques can be applied to
page layout, graphics creation, and other interactive
tasks .
Selection precedes command:
• Every command is executed immediately when you
issue it. You are not asked to confirm it. You can issue an
undo command to reverse the effects of the last issued
command. Although the main purpose of "undo" is to
compensate for the lack of command confirmation, it can
also be used to change your mind after issuing a command.
• For a command like "close the active window" that requires no additional parameters, you simply issue the
command.
• For a command like "delete text" that requires one
parameter, you first select the parameter using the pointing device and then issue the command. Until you issue
the command, you can change your mind and make a different selection, or e':en choose a different command .
• For a command like "send electronic mail" that requires
several parameters (recipient, subject, content), you first
fill the parameters into a form using modeless text editing
and then issue the command. You are not in a mode while
filling out the form. If you want to copy something into
the form from another place, you can. If you want to do
something else instead, just do it; you may even return to
the form later and finish filling it out.
Typing text always replaces the selected characters:
.Pressing a text key on the keyboard never issues a command . It always replaces the current selection by the
typed character and automatically selects the gap following that character .
• To replace a passage of text, first select it (photo Sa)
and then type the replacement. The first keystroke deletes
the original text (photo Sb) .
.To insert between characters, you first select the gap
between those characters (photo 6a) and then type the insertion (photo 6b). Essentially, you are replacing nothing
with something .
• The destructive backspace function always deletes the
character preceding the selection, even if that character
was there before the selection was made .
• The "undo" command (photos 6c and 6d) can be used
to reverse the effects of all your typing and backspacing
since you last made a selection with the pointing device.
Thus, the usual insert, append, and replace modes are
folded into one mode-replace mode-and one mode is
no mode at all.
Building Blocks for
Microcomputer' Systems,
Dedicated Controllers
and Test "Equipment.
R2 1/0
8-100 ROM,
RAM & 1/0
BOARD
RM-10
8-100
RACK MOUNT
CARD CAGE
ECT's R21/0 is an S-100 Bus I/O Board' with 3 Serial
I/O Ports (UART's), 1 Parallel I/O Port, 4 Status Ports,
2K of ROM with the 8080 Apple Monitor Program and
2K of Static RAM .
$295.00
ECT's RM-10 is a rack mount 10 slot Card Cage with
Power Supply , consisting of an ECT-100 rack mount
Card Cage (19"W x 12.25"H x 8"0), the MB-10 Mother
Board (with ground plane and termination) all 10
connectors and guides and the PS-15A Power.Supply
(15A @ 8V, 1.5A @ ± 16V).
$295.00
_ _II
'e
ELT'B.ECiiiONIC CONTROL TECHNOiiGya~;~1)
686-8080
763 Ramsey Ave., Hillside, NJ 07205 .
104
August 1981 © BYTE Publications Inc
Circle 129 on inqu iry ca rd .
Circle 388 on inquiry card .
-+
(Sb)
(Sa)
ttatn
..
.1-lJ.~('
· I L.')I/t·-.
~" t ·t.
,
~v
Ls exposeQi.
lurllY; rlw
au itS pal
ctpsRr~ b~~ eth.
, 'IC'
.
Photo 5: Replacing text in Smalltalk.
(6b)
w
isl exposea., au its
~
s.
text .a:
ontatn
teXt
ow
r
is
ev1 exposea., au, i
eont~nts.
rrartJJ~
ftv; (u;SRfOP
b~~
ch
Ie
(6d)
tairt bOth,
tex
w isl exposed.,
expo
orL.r.ellts _
is
text a
ntatn
el>e-~
au. its p~
~
·arLJJ~
th£ desRtOP by ctl{l
Ie
Photo 6: Inserting t~xt in Smalltalk.
Cream I 0 C r ecnTI 12
T'OIesRolltan8 TlmesRoman 10
Tim e sRo man1 2 F lXe dPlt c h10
Helve tica'18
H £"t- ~ a 10
t=«~®",,-n..tr o~)c.lIa++~.f) 1l~-i»@\,"""""'11
::.:.00A oeeeL 1(-0"'$:1 <>-+1: t C/v<1Oot +~
1\ ·{}O~Y.~!:;=]IR..l", U C .0' o(X~J. Vz7tcCl::J
1) ;;) §O~ XCVEEf~~zi.
Photo 7: Multiple typefaces can be used in any window.
106
August 1981 © BYTE Publications Inc
The "shift lock" key and analogous commands like
"bold shift" and "underline shift" cause modes for the interpretation of subsequently typed characters. However,
shifts are familiar to people and are relatively harmless.
The worst they do is change a "d" to a "0, " "d, " or "d"never to a Delete command.
The bit-map display can show boldface characters, as
well as italics, underlining, and a variety of styles and
sizes of printer's type (pho'to 7). Thus, as you enter text in
bold shift, the screen shows what the text will look like
when it is printed. A command like bold shift can also be
applied to existing text to change it to boldface.
In 1976, Dan Ingalls devised a user interface for
Small talk that incorporated most of the mode-avoidance
techniques discussed earlier. Consequently, it is rare in
the present Small talk environment to encounter a mode .
Making a Selection
In the Smalltalk-76 user interface, text is selected using
the pointing device and a single button . First, the cursor
is moved to one end of the passage to be selected (photo
8a). The selection button is pressed and held down while
the cursor is moved to the other end of the passage . This
operation is called "draw-through, " though it is not
necessary to traverse intermediate characters en route to
the destination . When the cursor reaches the other end of
the passage, the button is released. The selected passage is
then shown in inverse video (photo 8d).
The feedback given to the user during selection is as
follows . When the button is depressed, a vertical bar appears in the nearest intercharacter gap (photo 8b). {At the
(8a)
A one--paned. window
text
lS
tn
0
l-V indo w .
winaol-v
rnay ha.ve~9'n.y nurnber. Of pa-nes,
btu be n.{)e:~n. one ana. StX are
OM
- paned,
typical.
1-, p(l,n£~ c:a·n con.rain bortl rexr a-na.
qra P~-llC:; .
left end of a line of text, the bar appears to the left of the
first character. At the right end of a line, the bar appears
to the left of the final space character.)
If the button is released without moving the cursor, the
bar remains, indicating that a zero-width selection has
been made . This method-clicking once between
characters-is the one to use before you insert new text.
If the button is held down while the cursor is moved ,
the system supplies continuous feedback by highlighting
in inverse video all characters between the initial bar and
the gap nearest to the cursor (photo 8c). When the button
is released, the selected characters remain highlighted
(photo 8d). This method-drawing through a passage-is
the one to use before you copy, move, delete, or replace
text, or before you change it to boldface or otherwise
alter its appearance.
Clicking the button twice with the cursor in the same
spot within a word selects that whole word and highlights
it (photo 8e) . This special mechanism is provided because
it is very common to select a word. Informal experiments
lead us to believe that double clicking is much easier than
drawing through a word for beginners and experts alike .
It is also faster. It takes the average user about 2.6
seconds to select a word anywhere on the screen using
draw-through , but it takes only 1 .5 seconds using the
double click (reference 5).
There is only one selection in the active pane. It is
called the active selection .
(8d)
text
oM -pa.ned, window~
window
rnay h.a.vel:ny number of pa-MS,
btu betwe~\~
typical..
OM
aM six are
pane can. conta.i.n. l)oth. rexr
graphjcs .
po,
text
(ortrain. bor.h. texf ana.
II':, h ' xr \..S
01
OIIJ.' - pr;mo1 l,vm~tOHJ .
tn.
one -paned, window.
bur between one a·
typical.
/-,
~"l r[J,' (1 m
\ ' ... ·l(n
" H '.'.::.
[~' i [
m ut
~
,I li 'ln,to ll' IS ". ~r'O ·;I.... t . ,lU
r .' ,11:=l'[, l Q
l
Photo 8: Sele cting text using th e m ouse and the curso r.
August 1981 © BYTE Publications Inc
:i!lmfdm L)o[11
'.11',1 ptH!::~. ,
pane (a·ll, conrt1-in. borh. rext
gra pt-ltJ::;~; .
108
wilvtow
mill) h~lP'; I,ll'll:! nl,trni}e·r Of p(.lnJ.; s ,
l)lH t)I?fl{!I; Cn on>? aw1 s ix (ll'~
[ l)pL( a! .
rnay have
,~
,t., r'(1 rt( (:(1 n
qrl1rl t'll(·:,.
rtld '
,'I)
H I.TIC:.,
Issuing a Command
When you issue a command in Small talk, you are
sending a message to an object. There are two ways to
send a message from Ingalls's user interface. You can send
certain commonly sent messages to the active pane or
window by choosing them from menus; you can send any
message to any object by direct execution of a Small talk
statement.
(9a)
STARBASE
HYPERION'·
By Don Ursem
Beco me absorbed in this intri·
guing, original space sim ula tion
of war in the far fu ture. Use
strategy to defend a fron t line
Star Fort ress agai nst invasion
forces of an alien empire. You
create, deploy, and com mand a
fl eet of va rious classes of space
shi ps, whi le ma nagi ng limi ted
resources inc lud ing power
generators, shields and probes.
Rea l time responses are
sometimes required to take
advantage of spec ial ta ctica l
oppo rtu nities. Use of co lor,
sound, and specia l graphics
add to the enjoyment of thi s progra m. At lea st 24K of RAM is required.
On Ca ssette - $19.95
On Diskette - $22.95
/', P,11'u,' c , ~ n
c
11'1i1tn
I~OP 1J
'.1reIph v: '; .
1,~ l
(f
~
r 'll '; r·.' ,1(1\ r
"',1.' 'u~ 'l 11 1\ 'lrt'
11 11't..' ':. 1'.,- ,11-:. r't. ,'-0 In pIt.:
O:. '~il . I ~l ll':
(I t'tr ·: n r-:. .
t! n,10
( I ll' ",l
1 \' : '[
(9b)
NAME THAT SONG
By Jerry White
Here is grea t entertain ment for eve ryone '
Two players listen while the Atari sta rts
playing a tu ne. As soon as a player thinks
he knows the na me of th e song. he
presses his assigned key or joystick
button. There are two ways to pla y. Th e
fir st way requires you 10 type in Ihe name
of the son g. Optional ly, yo u can play
mu lt iple choice, where the computer
asks you 10 select the title from fou r possibilities. The stand ard version requ ires2 4K of
RAM (32K on diskette) and ha s over 150 songs on it. You also get a 16K ve rsion tha t has
more than 85 songs. The instructions ex plain how you can add son gs to th e program. If
you Wish. Written In BASIC.
On Cassette - $14.95
On Diskette - $17.95
~" 1 -:. !
,1 \l 'lrt;!
T...· ,1t.': pl, CI) rnr' lll.·
QS FORTH
By James Alban ese
Want to go beyond BASIC' The remarkably efficien t FORTH programming langua ge may
be just for you . We have taken the popula r f,g·FORTH model from the FORT H Interest
Group and expanded it for use with the Atari Pe rsona l Computer. Best of al l we have
written substa ntial doc umentation, packaged in a three ring bind er, tha t incl udes a
tutorial introdu ction to FORTH and num erous exa mples. QS FORTH is a disk ba sed
system tha t req uires at least 24K of RAM and at least one disk drive. Five mod ules th at
may be load ed separately from disk are the fi g·FORT H kernel , ex tensions to standard
f,g·FORTH, an on ·sc reen editor, an 110 mod ule that accesses Atan's operating system,
and a FORTH assem bler.
Diskette and Manual - $79 .95
Manual Only - $39 .95
FOR OUR COMPlETE LINE OF AlARI SOFTWARE
PLEASE WRITE FOR OUR CATALOG
~
~~~:~Ui~~~~~~
~
(2 13) 344 -6599
ASK FOR QUALITY SOFTWARE products at yo ur favorite co mputer store. If nece ssary
yo u may order directly from us. MasterCa rd and Visa ca rdholders may place orders by
ca lling us at (213) 344,6599. Or mail your chec k or bankca rd number to the address
above. Californ ia residents add 6% sa les tax. Shipping Charges: Within North America
orders mu st include $1.50 for shi pping an d handling. Outside North America the
: harge for ai rm ail shippin g and handling is $5.00. Pay in U.S. currency.
·Indica tes tradema rk s of Alari.
110
.'
,1J) lf
August 1981 © BYTE Publica tions Inc
Ci rc le 322 on inqu iry card.
Irt, i(1
1,-
Il ~ "11 - ~ "l
1\ \.,
11'; [ I.' ~ f tS trt
I
0 I 1)
Olh' - P'I I LJ: ,1 It'lrv1ow. /-, lVU1I10 HJ
'-'-lil t) t'ulPi.' ',1n 1) flU rnV.n Of pn rw s~ ~
,t., p illh' 1.'IH t 1,~Cil : [ l ltn
t'orh [.;:n cl w1
'.1 nI pl'Lv,' ':, .
'·.\ .''I'L(I l 11 \t ' tn] 1m t' 1.':. ',' ~ po si.~1<1 . 'Ii
r ',l l't{ ':: 1" , 11ISpl'11.l [ I·L•.' 1r ,,'on f ( n f':..
.
,
,
Photo 9: "Cutting" text in Srnalltalk .
16809 "
SOFTWARE
.POWER TOOLS
.
BY MICROWARE®
OS-9 ™ MULTIPROGRAMMING
OPERATING SYSTEM
A
rue multitasking, real time operating system for
timesharing, software development, database,
process control, and other general applications.
This versatile OS runs on almost any 6809·based computer.
• UNIX™ -like file system with hierarchical directories,
byte' addressable random-access files, and full file security.
Versatile, easy-to-use input/output system is hardware independent and expandable.
• Powerful "shell" command interpreter features: I/O
redirection, multiple job stream processing, and more. Includes a complete set of utility commands.
• OS-9 Level Two uses hardware memory management
and can address over one megabyte of memory. Also
includes pipes and filters for inter-process data transfers.
• OS-9 Level One runs on systems without memory
management hardware having up to 56K memory.
00S-9 Level Two $495* 0 Level One $195
Smalltalk-76 provides pop-up menus for the most commonly used commands, like "cut," which deletes the
selected text. To issue the "cut" command, you pop up
the active-pane menu with one of the menu buttons on
the mouse (photo 9a), keep that button down while moving the cursor to the command name (photo 9b), and then
release the button (photo 9c). A command in the pane
menu can have only one parameter, the active selection.
A command in the window menu can have no
parameters.
To issue a command that is not available in a menu,
you select any place you can insert text, and type the
whole command as a statement in the Small talk language
(photo lOa). Then you select that statement and issue the
can a·fTa·nge
cha·nqi.nq rM sizes and locarwns
H) i.MJ)\',1) S •
l.~se r
0
4 Tn.ax: 5
BASIC09 ™ PROGRAMMING
LANGUAGE SYSTEM
BASIC la~guage compilerlinterpreter with
mtegrated text editor and debug package. Runs
standard BASIC programs or minimally-modified
PASCAL programs.
• Permits multiple named program modules having local
variables and identifiers. Modules are reentrant, position
independent and ROMable.
• Additional control statements for structured
programming: IF ... THEN ... ELSE, FOR ... NEXT,
REPEAT ... UNTIL, WHILE ... DO, LOOP . .. ENDLOOP,
EXITIF ... ENDEXIT.
• Allows user-defined data types and complex data
structures. Five built-in data types: byte, integer,
9 digit floating-point , string and boolean .
• Runs under OS-9 'M Level One or Level Two. 0 $ 195 *
E
~tended
OTHER OS_9 ™ FAMILY SOFTWARE
• Stylograph 'M Screen-Oriented Word Processor
• Interactive Assembler
• Interactive Debugger
• Macro Text Editor
BASIC."9 and OS·9 are trademarks of Microware® and Motorola. UNIX is
a trademark of Ben Laboratories.· Most software is available on ROM or
diskette in versions for many popular 6809 computers. Contact
Microware® for specific availability.
For compatible hardware see GIMIX ad page 12B.
arranqe
fOp
sizes CHlJi loccH:wn..s
CO
H
((1 nJ~ (: l
(ll iJ.in
q '; 1_ r 1_- 0:1 n
d O
ll{ rlilt nn
(l 1"1"1.1
rliJI'
fOp
rh(:
~; tZ(;.s (lrl11.
4
r-'.nx: 5G
l-Vt ndj~ll1J:~.•
lDCGl lions Of
~
MICROWARE®
Microware Systems Corp., Dept. B2
5835 Grand Avenue, Des Moines, Iowa 50304
(515) 279-8844 • TWX 910-520-2535
112
August 1981 © BYTE Publications Inc
Circle 242 on inquiry card .
Photo 10: Executing text using the "doit" message.
Circle 335 on Inquiry card.
--+
_A move is done by cut and paste. First, you select the
source text and issue the "cut" command (photo lla).
The "cut" command deletes the selected text (photo llb),
but leaves it in a special place where it can be retrieved by
"paste. " Then you select the destination and issue the
"paste" command (photo llc) to complete the move
(photo nd).
_A copy is done by copy and paste, which is completely
analogous to cut and paste, but does not delete the
original text.
single-parameter command "do it" (photo lOb) to obtain
the result (photo 10c) . The "do it" command provides immediate execution of any Small talk statement or group of
statements . This method of command issuance uses the
previous method : you are sending the message doit to the
pane, with the Small talk statement as its parameter.
It is standard practice to keep a "work-space" window
around the screen in which to type your nonmenu commands. When you w imt to reissue a nonmenu command
issued earlier, simply select the command in the workspace window and "do it. " You may, of course, edit some
of the parameters of the old command before you select it
and "do it." In a sense, you are filling out a form when
you edit parameters of an immediate statement .
Unfortunately, the common commands "move text
from here to there" and "copy text from here to there"
cannot be issued by a single menu command because they
require two parameters, the source selection and the
destination selection. Sometimes, they even involve
messages to more than one pane, the source pane and the
destination pane. In a modeless system, a move or copy
command is done in two steps:
Remember the "copy-from-file" example (the one
where you had to go in and out of many layers of
modes)? In the Smalltalk-76 user interface, you can accomplish this with six pushed buttons, no mode exits,
and no typing : (1) activate . the source window that
displays the file you are copying from; (2) select the
desired text; (3) issue the "copy" command in the menu;
(4) activate the destination window; (5) select the destination point, and (6) issue the "paste" command in the
menu. The job requires little more effort than copying
within the same document. If the window is not already
(lla)
(llb)
( :/ ~[ '1S
-Its f 6.X f 1S tn, [
n( of
(,l
(l(](lln
flV(I-pane , lvLn40
'has Cl u/j,ndou/
ha s a pl'Jn {. nj'
t.n the nBh.r -:-fu':tna
ot a· n,{)o-paned. l-VtMOU).
,vtnao1-v has a u/indouJ rn.tn I
jclch. pan.£: has a ' fil 'j.~n.~ rj'j~n(J
, I.
. --' - •
~-"l'-'
,{l) i r
I.-ornpUr
1{ ruio
(lld)
text
pa,ne Of a, tWO
window.
The window h.as a, uJin~1oul mttnfJ
a,rui eacrL pa,n.e has a pamtt mttnu.
breakl at
Photo 11: Moving text in Smalltalk.
114
August 1981 © BYTE Publications Inc
on the screen and you can't remember the file name, you
can go to another window and scroll through a list of files
without having to exit any modes, invoke any programs,
save any edits, lose sight of the destination file, or lose
any time.
The Smalltalk-76 text-editing facilities not only relieve
you of the burden of modes, they also require very few
keystrokes and are easy to learn.
Software-Development Aids
One of my summer projects in 1977 was to increase the
speed and friendliness of the Small talk softwaredevelopment environment by adding inspect windows,
browse windows, and notify windows to the user interface. These and other enhancements made by the Learning Research Group are described below . In recent
months, the team has further enhanced the Smalltalk-BO
environment. Although it conforms to the same principles as before, its details are different from what is
described in this article.
EPSON
PRODUCTS
MX80/70 FRICTION FEED
KIT by Orange Micro
HERE AT LAST! A friction feed kit
for your EPSON MXBO/70. The kit
allows the user to convert his
Epson printer to a friction feed and
pin feed mechanism.
The friction feed will accept Single
sheets of your letterhead, or mul·
tiple copy forms such as invoices
with up to 4 part carbon copies.
The pin feed replaces the adjust·
able sprocket mechanism. It allows
use of 9 V2 " wide continuous fan·
fold paper which is an industry
standard size.
DEALER INQUIRIES
INVITED
EPSON
MX80
Inspecting Data Structures
Suppose someone has given you a SmaUtalk program
to implement a "regular polygon" class (table 1) and you
want to learn more about it. It would be helpful to see an
actual instance of a regular polygon.
If the variable triangle refers to a regular polygon, you
type the following statement into your work-space
window:
$75. 00
No drilling required. Installation
takes about 15 minutes. All parts
are included with easy to follow
instructions.
• 9 x 9 dot matri x • Lower case.
descenders • BO CPS • Bi di rec·
tional , Logi c seeking • 40, 66, BO,
132 colu mns per line· 64 special
graphic characters: TRS·BO Com·
patible • Forms hand ling· Multi·
pass printing· Adju stabl e trac tors .
MX80 . . . . . . . . . . . . . . . . . . . . . . . .
. .. . (List $645) $ CALL
MX80 Dot Graphic s Upgrade .. . . ... .. ... (List $100) $ CALL
triangle inspect
and then issue the "do it" command in the pane menu
(photo 12a) . In a few seconds, a two-paned "inspect window" appears on the screen. Its title tab tells you the class
of the inspected object, in this case, RegularPolygon. The
window is divided into two panes. The left or variable
pane lists the parts of a regular polygon, sides, center,
radius, and plotter. The right or value pane is blank .
You point to the word sides in the variable pane and
click the selection button on the mouse. The word sides is
highlighted, and in the value pane, the value of the
variable sides appears (photo 12b), in this case, 3. You
point to the word center and click. In the value pane
appears the value of center (photo 12c), in this case, the
point 526@302. The value pane is dependent on the
variable pane because its contents are determined by
what you select in the variable pane. The arrow in figure
3 symbolizes this dependency.
Let's inspect the value of center. In the variable pane,
where center is selected, pop up the pane menu and issue
Va riab le
Pa ne
Va lu e
/
Pan e
Figure 3: Principal dependencies among panes of an inspect
w indow.
116
August 1981 © BYTE Publications Inc
Circle 282 on Inquiry card .
EPSON
MX70
resol~u~ti~on~----~
• Super low· priced dot
graphics· 5 x 7 dot matrix · User
replaceable printhead • Top of
Form.
MX70 .... . .. . .... ..... . ..... .
. (List $495) $ CALL
EPSON
MX80 FT
MX80 FIT . . . . . . . . . . .
• Same basic features as the MXBO
• PLUS friction feed for Si ngl e
sheets. and adjustab le tractors .
. .. .... . . . . (Li st $745) $ CALL
APPLE INTERFACE
For Epson
The Grapple?M interface card is
the fir st to provide on-board firm ware for Apple high resolution dot
graphics. No longer does the user
need ,to load cl umsy software
routines to dump screen graphics
- it's all in a chip. Actually , it's our
E-PROM , and it is replaceabl e to
accommodate the Anadex, Ep son
MXBO & MX70, I DS Paper Tigers ,
Contronics 739, and future graphics
printers. The Grappler™ accepts
17 software co mmands including
Hi-Res inverse, 90· rotation , double
size, and much more.
$165. 00
In c ludes Cable
DEALER INQUIRIES
INVITED
The following template contains a description of a regular polygon with the following attributes:
sides
Number of sides (3 for a triangle,S for a pentagon, etc.).
If the regular polygon were inscribed in a circle, this would be its center point.
center
radius
If the regular polygon were inscribed in a circle, this would be its radius.
plotter
A pen that can draw an ima~e of th,e polygon on the screen or on paper.
The following expressions provide an example of creating and using an instance of RegularPolygon .
triangle -
RegularPolygon Sides:
3 radius 50,
triangle translateBy: -90 @ 60,
triangle plot: black,
{nnw)!. r f<1I1s.t'1f!? B\}:
triangle translateBy: 165 @ 20,
- 9\)
@I 60 .
rrVl rt?-1 tmnstlltcBIJ: -90 @ 60.
tnl1 l ll)\( r~(l f: t)lilC~: .
o
triangle scale: 0,6,
tria ngle plot: gray,
"where gray denores an Ink color"
e1ass name
RegularPolygon
superelass
Object
instance va ri able names
sides center radius plotter
lt1Jl1b}'
tnnnq!.( rr\l!~In!'::P.'): 165 lit'
rnonqi.t s..;(1I~ : O .t~ .
IIVHUJ\" r1(1f : IJ!~I'.I .
plOl~
blf\ck.
rnUfIlJ\( r' ..l nshll.Eu: IfS I.~I 20 .
mJ)ruj.:
$Ci'lt.' :
0.-:> •.
rMn~ flWl: IJhl'J.
class messages and methods
initialization
sides: s radius: r I
"Creare an Insrance of RegularPolygon whose center IS locared ar rhe cenrer of rhe currenrly acrive window on rhe display screen , Screen IS a
global varrable [hal refers to Ihe hardware drsplay screen,"
1 self new sides: s radiu s: r center: (Screen activeWindow frame center)
instance messages and methods
initialization
sides: s radius: reenter: c
I
"Inrtraille all arrrrbures, Class Pen IS proVided In tile system as one way of srde effecrlng [he display screen'
sides -
s,
center -
c.
radius -
r,
plotter -
Pen width:
2
ana lysis
center I
"Answer [he center coord,na[e of rhe polygon,"
I center
sides
II
"Answer Ihe polygon's number of sides,"
1sides
display
plot: Ink
II
"Draw an rmage of rhe polygon uSing rhe specrfled Ink color.
"llf[ [he pen [0 disable drawrng"
plotter penup,
plotter goto: self center,
"posrtlon rhe pen ar rile center"
plotter up,
"face [he lOp of rhe screen"
plotter go: radius,
"POSItIon at a corner"
plotter turn: IBO - Iself cornerAnglel2j
"rum
plotter color: ink,
"selec[ rhe rnk coloI"
plotter pendn,
"lower [he pen ro enable draWing"
I to: sides do:
[:i I
face along a srde "
"for each srde of the polygon :"
plotter go: se lf sideLength,
plotter turn
[0
lBO-self cornerAngle]
"plor [hal srde"
"rum to face along rhe next Side"
transformation
scale: factor
II
"Scale [he polygon radiUS by [he specrfled fac[or,"
radius -
radiUS * factor
translateBy: deltaXY
II
"Change rhe polygon's location by rhe specrfled amount la POlntj ,"
center - center + deltaXY
private instance methods
cornerAngle
I I "Answer [he Intenor angle of any vertex,
In degrees,"
1 180 - (360 1 sides)
sldeLength
I I "Answer Ihe leng[h of any one 01 [Ile equal Sides ,"
12 * radius * (self cornerAngle 12) degreesToRadians cos
Table 1: Description and class template for class RegularPolygon.
118
August 1981 © BYTE Publications Inc
Circle 397 on inquiry card,
--+
the "inspect" command (photo 12d). On the screen
appears another inspect window showing that center is
an instance of class Point (photo 12e). You can now ex(12a)
tru~ngJ.e '
ttiGm9i£
, tfia.n.gJ.e plot
..- .........
165
amine that point's variables, x and y, reactivate the
original inspect window, close either or both windows,
or work in any other window. You are not in a mode.
Browsing Through Existing Definitions
Now that you have inspected a sample regular
polygon, you might want to find out what methods have
been defined in its class. One way to do this is to activate
a window called a "browse window" or "browser." Most
Small talk programmers leave a browser or two on the
screen at all times with the work-space window.
The title tab of the browser (photo 13a) says "Classes"
because the standard browser lets you examine and
change the definitions of all Smalltalk classes-classes
supplied by the system, as well as classes supplied by
yourself . It is easy to create a more restricted browser
that protects the system from ill-conceived modification.
But on a personal computer, you are just going to hurt
yourself.
The browser has five panes. The principal dependen(12d)
tri..a.n1Jl.e inspect. '
1. rianqli
ins pect:.
Photo 12: Inspecting data structures in Smalltalk,
120
August 1981 © BY',l, Publications Inc
ADD EXCITING MUSIC
TO YOUR APPLE®!
II Mft~ ! r"r ftJ t l'J>l:r
~
~
INS DEL TIE ~
•
9474 FREE
SUB
MEASURE
END
~
SAUEIII
A L F's 9-voice Music Card MCI
is only $195.
Here's what our customers have said:
(Excerpts from unsolicited letters. Copies of original letters available on request.)
About the A L F system:
It's a rare enough occurrence when hardware/software lives up to one's
expectations. For something to exceed one's wildest hopes - as the ALF
synthesizer certainly does - is a real treat. My congratulations to all
concerned.
-Dhahran, Saudi Arabia
I myself have told several people that next to a disk, I consider the [ALF]
synthesizer to be the most important peripheral they could purchase for their
system. Very excellent job! Keep up the good work.
-Oak Ridge, Tennessee
I recently purchased 2 of your Apple music boards. Out of the peripherals I
have for my Apple, I enjoy them the most. It has to be the most enjoyable
thing that has ever been invented. I hope you continue to develop products as
clever and enjoyable as this one. The Entry program has to be one of the most
sophisticated programs I have ever seen . It proves that a hardware manufacturer DOES have the ability to also produce quality software. It is almost
worth the price of the boards just for the Entry program.
-Burbank, California
About ease of use:
I have had my Music Card MC1 for a little more than a week now and I have
almost completed entering "The Maple Leaf Rag". I found it to be a lot
simpler than I thought and so I am very, very pleased. My family isn't because
I sit up to all ends of the night playing with the blasted thing!
-Cypress, Texas
ALF has opened up my head and ears and enabled me to do things musically
which I would like to be able to do on [conventional] instruments. As much as
I love the instruments I try to play, I just don't have the talent and technique to
play what is in my head. By golly, the ALF board doesn't know about my
limitations, though. I can play hell out of that thing, playing notes and tempos
which previously have existed only in my head. Many thanks from a fru st rated
musician and sa tisfied ALF " player".
-Demopolis, Alabama
About documentation:
I don't know much about hardware, but I have been a programmer for 15
years and I have never seen a better piece of software documentation than
your user manual. It is a joy to study I
-Lan caste r, California
cies between panes are symbolized by arrows in figure 4.
The top row has four panes called the class-category
pane, class pane, method-category pane, and method
pane. The large lower pane is called the editing pane.
(After you have used the system for a few minutes, the
significance of each pane becomes apparent, and it is not
necessary to memorize their technical names.) .
In photo 13a, the browser shows a method definition in
the editing pane. You can tell that the method is class
RegularPolygon's version of scale: because RegularPolygon is highlighted in the class pane and scale: is
highlighted in the method pane.
The method-category pane lists several groups of
methods within class RegularPolygon: initialization,
analysis, display, transformation, testing, and private
methods. You can tell that scale: is a transformation
message in class RegularPolygon because that category is
highlighted.
The class-category pane lists several groups of classes,
including numbers, files, and graphical objects. You can
tell that class RegularPolygon is in the graphical objects
group because that category is highlighted.
Suppose you want to look at a different method,
translateBy:. Click its name in the method pane and its
definition is immediately displayed in that pane's dependent, the editing pane (photo 13b). If the method you
want to see is in the method category analysis, first click
that category name. Immediately after you do that, its
dependent, the method pane, lists the methods in that
category. Now you can click the name of the desired
method (photo 13c).
If you want to know things about the class as a whole,
like its superclass and field names, click "Class
Definition" in the method-category pane and the definition appears in the editing pane (photo 13d).
Suppose you want to look at a different class, say
Irregu/arPolygon . Click its name in the class pane and its
method categories are immediately displayed in the next
pane (photo 13e). If the class you want to see is in the
class category windows, first click that category name.
Immediately after you do that, the class pane lists the
classes in that category. Now you can click the name of
About the competition:
Recently, I purchased an [ALF] 9-voice board and a couple of mu sic al·
bu ms .... alii can say is that I wish I had listened and played with it before I
purchased the Mtn. Hardware board . It sounds about the same and is vastly
superior in software, ease of use, and price . The Entry program is a joy to use
and it's easier than Mtn. Hardware 's, but then, I guess you guys know that
already . (Oh yes, you wouldn't happen to know of anyone th at wan ts to buy a
Mtn . Hardware system? $450 or best offer?)
-Kirkland, Washington .
I would like to tell you that after having used the system ONLY ONE DAY, that
I am absolutely delighted with it. In addition, I purchased the three boards
althoug h I ALREADY own Mountain Hardware 's music system. Now that I
have see n and own your system , I am putting my "old" one up for sa le. I think
that your software makes it far easier to enter music , and that the software
routines allow for far greater flexibility. Again, I extend my compliments 10
you . As I said, I have owned another music system , and consider myself
Iherefore, qua li fied to make a judgement between the use of the two. Yours is
Ihe clear cho ice'
- Levittown. New York
~
Class Category
Clo ss
Method Category
Method
Pane
Pane
Pone
Pone
-
f-7
-
~
-
~
I
-t
Editing
Pone
see your I~~a~~f:le® dealer
:\I'P:~·
122
A L F Products Inc.
1448 Estes
::-
,1 f1,h: .. ·llhlr ~ ,,:
August 1981 © BYTE Publications Inc
Denver, CO
App; ..• C, .mpu:t;'r 111 (
80215
Figure 4: Principal dependencies among panes of a browse
window.
the desired class (photo 13f).
Categorization is used at both the class and method
level to help the programmer organize his or her program
and to provide fewe r choices in each pane . If a list is
longer than what can fit in a pane, it can be scrolled by
pressing a mouse button with the cursor in the scroll bar.
If you just want to browse around reading class and
method definitions, you can do so by lazily clicking the
selection button with the cursor over each name , never
touching the keyboard. That is why the window is called
a browser. Browsers are further discussed in references 6
and 7.
Astute readers may have noticed that the class
template (see 'The Smalltalk-BO System" by the Learning
Research Group on page 36 of this issue) presents the
methods of a class apart from the methods of its in-
stances, while the browser does not. This discrepancy
stems from differences between the Smalltalk-BO and
Smalltalk-76 languages .
{13a}
{13b}
Revising Definitions
If you are looking at a method definition or class
definition in the editing pane, you can revise it using the
standard text-editing facilities (select, type, ~ut , paste,
copy) .
If you like, you can copy information into the definition from other windows-including other browse windows-because you are not in any mode while browsing .
You can even interrupt your editing to run another program, list your disk files, draw a picture, or do whatever
you like. You can later reactivate the browser and continue editing.
{13d}
, "-,
!,:;nus'
Yo
IU1S pl4l.\~ Fonn
Fonn HalfTone
HaLf Toner
Jrregu!a rPotqgon
Poinr
R.?'c( .mqle
_ _ ..........·...-..,. ........... _v __
N>A~ '
-._
1-
...~-
CUlsWrg(lfUZaHon
'iniriahza.rion'
' anal ys is'
'a.ispla.y'
-
\
'rransforrn.arion'
'resri.n~1'
'ptiv\'l.re insr.ance
rrl'?-
s: ' Regu arPotygon
es cencer
r~tlus
ploner'
graptut:al ot))ccrs'
',6, requh'lt' polygon has (siaes) verrices,
f elCh a·r t1 dtst:t'ln.ce Of (ra4i.u.s) from (c(. nrer) .
If IS (:\rm l n on rtw screen by fhe pen (r,[orrcri. '
Photo 13: Browsing through existing definitions in Smalltalk.
124
August 1981 © BYfE Publications Inc
The following template contains a description of an irregular polygon with the following attributes:
vertices
An OrderedCollection of Points.
plotter
A pen that can draw an image of the polygon on the screen or on paper.
The following expressions provide an example of creating and using an instance of IrregularPolygon.
triangle -
IrregularPolygon vertices:
( OrderedCo liection with : 2 @ 2 1
with : -25 @ -35
with: 52 @ -7)
triangle translateBy -90 @ 60,
triangle plot : black ,
triangle translateBy: 165 @ 20,
triangle scale: 0,6,
triangle plot: gray, "where gray eJenmes an Ink color"
elass name
IrregularP o lygon
superelass
Object
instance variable names
vertices plotter
class messages and methods
initialization
vertices: aCollectlon
II
" Create an Insta nce of IrregularPolygon whose center IS localed al Ihe center 01 the currently active window on the display screen
Screen IS a global varrable that refers to the hardware display screen ,"
1 se lf
new vertices: aCollection cente r: (Screen ac tiveWindow frame center)
instance messages and methods
initialization
vertices: aCollectlon center: c
II
" Initia lize ali arrntJutes, Cla ss Pen IS provided in the system as one way 01 Side effecting the display screen,"
vertices - aColiection ,
plotter - Pe n width: 2"
self trans lateBy: c - se lf cente r
analysis
center
I sum I
sum -
O@O,
"A nswer Ihe cenler coordlna le 01 Ihe polygon ,"
vertices do [ :pt
1su m / self sides
sides
I sum
-
sum
+
ptj ,
II
1ve rtice s
display
plot: Ink
"Answer Ihe polygon's number 01 srdes,"
size
II
plotter penup ,
"Draw an Image 01 Ihe polygon usrng Ihe specllred Ink color,"
"1111 Ihe pen 10 drsar)le clrawrng"
p lotter goto: ve rtices last.
p lotte r color: Ink,
"selec ! [he Ink colo,"
"pOSItion the pen at one vertex"
plotter pendn ,
vertices do
[pt
I plotter
transformation
scale: factor
"lower !he pen to enable clrawlng"
" for each v ert ex"
goto ptj
I
"clrawa srr arghl Irne 10 rl"
I
ce nter
"Sca le Ihe polygon by the specrfl ed fa ctor,"
ce nter - self ce nter,
vertic es - vertices coll ect :
[ :pt
I (pt
- center) -factor
trans/ateBy: deltaXY
+
"[he center o( expansion"
"gene/ate new ve n ex
liS!
from old 115("
center]
II
"Change Ihe polyyon 's local Ion by Ihe spec illed arnowli I" POlnq ,
verti ces -
v ertrces collect: [ vertex
I v ert ex +
de lt aX Yj
Table 2: Description and class template for class Irregu/arPo/ygon,
126
August 1981 © BYfE Publications Inc
Circle 4 on inquiry card ,
--+
When you are done editing, pop up the active-pane
menu and issue the "compile" command (photo 14a) .
Compilation takes a few seconds or less because it is incremental-that is, you can compile one method at a
time. The compiler reports a syntax error to you by
inserting a message at the point where the error was
detected and automatically selecting that error message
(photo 14b). You can then cut out or overtype the
message, make the correction, and immediately reissue
the "compile" command .
If you start to revise a definition and change your mind
about it, you can pop up the pane menu and issue the
(14a)
(14b)
r:': TTL>.' ! ( ~1 -:.':'''- '0'
Ir I (rntl.: rs '
leer.s
·'ld.:11n
copy
t-Hr.
f,"IW:: f,:
(ion
e<l
",'
Point:
, aga·tn.
copy , (Jon
cut
pCl,sr.e
dOLt
cornpile
uruio
Photo 14: Options during method compilation,
6809 SYSTEMS
C8
6809 SYSTEMS
C8
6809 SYSTEMS
C8 .6809 SYSTEMS
Featuring the GIMIX mainframe with 30 amp C.V. ferro-resonant power supply: fifteen 5.0 pin and eight 30 pin slot Mother Board:
2 Mhz CPU with time of day clock & battery back-up. lK RAM . 6840 programmable timer. provisions for 9511A or 9512
For lurther inlormalion , pricing and brochure s, conlacl :
Arithmetic processors. and 4 PROM/ ROM / RAM sockets that can hold up to 32KB of monitor or user software.
VARlm: you can have 32KB , 56KB, 128KB and up of static RAM . You can use 5" and l or 8" disk drives, single or double ~
density. single or double sided, and single or double tracking with GlMIX disk controllers, You have a wide choice of serial or
• ....
.
parallel liD cards.
'-"
The Company Ihll dall.a,.
EXPANDABILlTY: You can add memory. li Ds , Video or Graphics card s. Arithmetic processors . additional drive capacity. and other
Quality Eleclronic producls since 1975.
hardware now or in the future to this SS50 bus structured system from GIMIX or other SS50 bus compatible manufacturers.
1337 WEST 37th PLACE, CHICAGO, tL 60609
SOFlWARE VERSATILITY : GIMIX systems can use TSC's FLEX or UNIFLEX and MICROWARE 'S OS-9 operating systems . A wide
(312) 927·5510 • TWX 910·221·4055
variety of software and languages is available for these systems.
QUALITY: All boards are assembled , burned-in. and tested and feature GOLD PLATED BUS CONNECTORS, Only top quality com. GIMIX" and GHOST" I a:e regislered Irademarks
ponents are used and all boards are fully buffered for maximum system expansion . All boards come complete with bus connectors
01 GM X Inc .
and all necessary instruction and documentation .
Flex and Unillex are Irademarks 01 Technical Systems
GIMIX designs. manufaclures and tests. in·house, Iheir complete line of products . Complete systems are available to fit your Consu ltanl s Inc. 059 is a lrademark 01 MlCroware Inc . See
needs. Please contact the factory if you have any special requirements.
Iheir ads lor Olher GIMIX compatible sollware .
r-lmlXlnc
For GIMIX compatible software see Technical Systems Consultants ad page 183 and Mlcroware ad page 112.
128
August 1981 © BYTE Publications Inc
Circ le 145 on inquiry ca rd .
"cancel" command (photo 14c). The "cancel" command
redisplays the last successfully compiled version of the
method (photo 14d). If you cancel by accident, just issue
the "undo" command to return the revised version .
Adding New Definitions
To add a new method definition, select a method
category. In the editing pane, a template appears for
defining a new method (photo lSa). The template
reminds you of the required syntax of a method.
(15a)
Use standard editing facilities to supply the message
pattern, variable list, and body of the method. When the
definition is ready, issue the "compile" command (photo
ISb).
Once compilation succeeds, the selector of the new
method is automatically added to the alphabetized list in
the method pane, and the message pattern is automatically changed to boldface in the editing pane (photo ISc) .
A new class definition is added in an analogous
manner . Start by selecting a class category (photo lSd),
then fill in a template for defining a new class and compile it (photo ISe) . New categories can be added and old
categories can be renamed and reorganized.
Program Testing
Let us purposely add a bug to a method and see how it
can be tracked down and fixed .
Browse to the method cornerAngle in class RegularPolygo n , cut out the characters" J 80 - " (photo I6a),
and recompile it. In the RegularPoly gon w o rk-space window , select the test program and issue the "do it" command (photo I6b) . Instead of the desired triangle , an
open three-sided figure is drawn because of the bug introduced into the angle calculation .
y
menus '
(ISb)
. I':c TT1£1 eLll ':.:.'; S
'n u rnl.)( rs j
',:oll>: co ons'
'f,: I f '
(15d )
Fonn
H,llfTon.:
HlllfTon,: r
Irr': 'll,IoI!'Pol! 11 0n
,_ !
f l l r 11l.s ~1 1Illl'
'll 'lnfto lvo; '
F:".:,.:; w nql(
'p,ln{S LVi,i
I~ "
rn.:? n liS,
=l ' l ~":.I:'q, \J !I! ~:I
IL'\::;P' 1\ 1rUTTJ I
F'O\l1f
'ftl.:S '
r rmno::rcr I I,
".
,
.
Fonn
Hal.fTone
Hal-fToner
,1\Sjoo!'11l
'r r,I)ls fi:ITTJ1,1r
'r.:s f\nl1'
hTegul.a.rPoLygon
Poi.nr
"l- 'r'r\ljl lf ~' tn ·o· f ,
" rtH' stlm Of !nl) ':.,,1.: [tn0rh::."
s,' 1t -:. 1,1t L, n ~lft 'l
1 sv1{'3
•
i_lli',:;;,i!" l,l !I':::
' !11 \(\ ,11\:,1 f\(i )1
R.?-cra.n9lR
Regula rPol.ygon
.1'.l,1tn
cOf".1
': II f
~"
1':. r.:
,10 lf
rIJIliUill ~
rr:,o
II
, i\ Til ','1
,lll'll i
(1Se)
.
'-"W~"",''''~'~llfx '"·.·~'t'tlt
m ,\:~:: :i:r~llli~.<_·/';:::~~'.:
(ISc)
,
:'collecrions'
I'reJ(['
nUrnDers ,
•••
~""I.I~
rex{ a.tspUl-Y
'IVtnrtOIVS'
:ru:~~s and menus'
Utl) ecr
Of my side len<)!.hs"
Slde Um<)!h
sides • self
August 1981 © BYrE Publications Inc
p y
Fonn
HalfTone
Hal Toner
tlTegularpolY90n
Poinr
Rectangle
~2..~~~~~
'Ctre ~ '
'center radius ptouer'
Mcla.re.: "
sharing: "
category: 'graphical objec ts'
commen.r.: 'A circle is d.escril>ea by irs (cenrer) and (ractiw:
If is a.rawn by (plorrcr), a pen.,
Photo 15: Adding new defin itions in Smalltalk.
132
n.~~" ' ,~
SU1)CLaSS :
fl£l4s:
l'
"
' ': .'"
Breakpoints
To track down the bug, let us set a breakpoint in the
method cornerAngle. Using standard editing facilities,
add the statement:
self notify: 'about to calculate angle'.
before the return statement (photo 16c). Now rerun the
Fonn.
HatfTone
Hatf To nJ?·r
Irre9t.ua.rPotY9on.
Poin.t
Recranqle.
'(:111.
l
r
'0
qqon
test case. When the computer encounters the breakpoint,
a new window appears in midscreen. It is called a "notify
window" (photo 16d) . The title tab of the notify window
says "about to calculate angle".
The notify window has one pane, the stack pane. It
shows RegularPolygon > > cornerAngle (ie: the class and
method in which the breakpoint was encountered). The
pop-up menu of that pane offers several commands, including "stack" and "proceed" (photo 16e).
The "proceed" command closes the notify window and
~ontinues execution from the breakpoint. If we issue a
"proceed" in our example, the same breakpoint will be
encountered again immediately because the cornerAngle
method is used several times during the execution of the
test program.
What a Notify Window Can Display
The "stack" command expands the contents of the pane
to include messages that have been sent, but have not yet
received replies (photo 17a). It reveals that the sender of
the message cornerAngle was RegularPolygon > > plot: .
The pop-up menu of the notify window offers the usual
repertoire, including the "close" and "frame" commands
(photo 17b). If "close" were issued, the notify window
would disappear from the screen and execution of the
Text continued on page 138
(16c)
ClasseS Il!~~~ll .
Ik>:mr l Glasses
rt u rnlic r:; '
( oUr ( fl O 'cS '
,.
"
Dt,S pl~1yFOTm
Fonn
- ClassDeftrmw
Cla.£.~; Or(.l(l n izn·
Hnlf Tone
'in.ini1l.tz,1 r tOn'
Half Toner
IrrGgl il<1rPolY90n. 'analysts '
'ats a9 a·tn
POtn f
r.: ~ f (1 t.splay
'rra cOP 1d t(
F:.: cra nqle
Wtna.oH's '
,,
p l1n (~. (1wt rn£-nus '
cur
- , . . - ......""-- _.paSTe I
Ift1.:.'; '
IA"n~H.. r~J I
. . .ns wl'r rlu' tnrenoT' a ctOt r II
-:.(I f noft \l : 'abom fO ,:;alcuh:n:e an~le '.
l.(nM
1 0;360/St.1( S)
calKel
r.:xr '
.
~~
Ho11t
~'~:~:h""""'1"11'1'1~""""~""""~===--'
'0\1ns
POll'! r
P':'.-r'1n'11r
RC9\Ua.fPiAi:j~On-
'{.: '; fl rli)'
:;Pftt'MC
\n$.tr.tt~I!'
alt(.jTl
Photo 16: Creating a faulty method for purposes of illustration.
134
August 1981 © BYTE Publications Inc
Circle 154 on inquiry card . .--.
Slack
Pone
I
Melhod~
v ariable
-
r
-
4
Pone
'./lnSlance
Variable
Pone
- ~
Edil i ng
Pone
Melhod
Va lu e
Pane
In stan ce
Valu e
Pan e
Figure 5: Principal dependencies among panes of a notify
w indow.
Text continued from page 134:
program under test would be aborted . Let us issue the
"frame" command instead. The notify window grows
larger and acquires a total of six panes (photo 17c) . Their
interdependencies are diagrammed in figure 5 .
The upper left pane is the stack pane retained from
before. The upper right pane is an editing pane. If you
select RegularPolygon > > plot: in the stack pane, its
method definition appears in the editing pane . You can
scroll through the definition and even edit it there and
recompile as in the browser.
The middle two panes are the "context variable" and
(17a)
"context value" panes. They are analogous to tl:te two
panes of an inspect window, but, in this case, the
variables you can examine are the arguments and local
variables of the method selected in the stack pane. Click
ink in the variable pane to see its value in the value pane .
The bottom two panes are the "instance variable" and
"instance value" panes. They also are analogous to the
panes of an inspect window. They let you examine the instance variables of the receiver of the message selected in
the stack pane . Click center to see its value appear in the
value pane.
You can type statements into the value panes and
execute them using "do it" (photo 17d). They will be
executed in the context of the method selected in the stack
pane-that is, they may refer to arguments and local
variables of the method and to instance variables.
Debugging
You could step through the execution of the method in
the editing pane . You would select one statement at a
time in the editing pane and issue the "do it" command.
To close in on the planted bug, we can evaluate self
cornerAngle, an expression on the last line of the method .
Select that expression and issue the "do it" command
(photo 18a). The answer, 120, appears to the right of the
question (photo 18b). Since the interior angle of a regular
(17b)
r.r'n ....' ... iIM·'>evaLu.a.t:e
n / " ' YIlI.n "
>e)(ecure:in:ro:
COM Pane>>e)(eCHre:for:
COM Pane » dJ.lir
Cod.e Pane>>yeUOwbu.g
Cod.e Pane >>ear.rh.rime
Photo 17: Use of th e "no tify " window .
138
August 1981 © BYrE Publications Inc
(ISa)
triangle is 60 degrees, we have found the planted bug.
Now select RegularPolygon> >cornerAngle in the stack
pane . Its method definition, including the breakpoint we
set, appears in the editing pane (photo l8c). Use standard
editing to remove the breakpoint, correct the error, and
recompile the editing pane (photo l8d) .
You can randomly access any level in the stack by
clicking it in the stack pane .
Resumption
fi~UI I~n lm~l4y,
0.
Jj
i:
J}}On
rJS
k l-:alor,"
p. ut{ rl1~~ .P!n. .{~ 11jS\w/~ 11.fii.uJin~
: self center. poslI.l0n rhi: ~n. c,.tnJj
II
{I'A';y, rhi: fOp of rhi: Sl,;rY*nII (1t'1"SiI.ion I~{ I .. l,;am~
2 ).
L.: '80 - (self GOTTl.er,A,n.gle
II nUll {[t {l'A';y, I1Jonq.u.. s-j~1t-'
II
adius.
: ink .
.a/
II
sy,j~~l';{ rhi: ink
II J1ou/{r
rhi:
ptr:n
l';(o'olr..,
After recompiling a method, you can resume execution
from the beginning of any method on the stack using the
"restart" command in the stack-pane menu (photo 19a) .
This lets the test proceed (photo 19b) without having to
start over from the work-space window . Resumption of
execution after a correction is a handy capability when a
program that has been running well encounters a minor
bug.
The entire stack of the process under test was saved in
the notify window. When a notify window appears, the
rest of the system is not preempted. You are not required
to deal with the notify window when it appears . You can
(19a)
{O r,-n~lbJ.i:
1Cl2 c-,O \aJ 1 74 00
~
Photo 18: Debugging a faulty method.
140
Augusl1981 © BYTE Publications Inc
Photo 19: Compilation of a faulty method can be continued
without restarting, once the error has been corrected.
Circle 284 on inquiry card.
-+
work in other windows and come back to it later, cause
other notify windows to be created, or work a little in the
notify window and then do something else. There are no
modes .
cept that if they are supposed to be "unrecoverable" they
are programmed as :
Error Notifications
If the user "proceeds" out of the notify window after an
error, the process under test is terminated.
The most frequently encountered Small talk error is
"Message not understood. " It occurs when a method is
sent to an object and neither that object's class nor any of
its superclasses defines a method to receive that message.
Let us edit the method sideLength (photo 20a) to send the
message cosine instead of cos. After recompiling that
method (photo 20b) and reexecuting the test program, a
notify window appears (photo ZOc) to announce that
class Real and its superclasses do not define cosine.
In most programming systems, equivalent error conditions such as "undeclared procedure" and "wrong
number of arguments" are issued at compile time.
Small talk cannot detect these conditions until run time
because variables are not declared as to type. At run
time, the object sent the message cosine could be an instance of a class that did define a method of that name.
Error messages are no different from breakpoints, ex(20a)
-- , \ J ,...- l......" J
-
""
-
•
~~~'!
II>
..
self error: 'error whatever'.
Type Checking
(20b)
When we program in languages like Pascal, we depend
on type checking to catch procedure-call errors early in
the software-development process. In return, we have to
take extra time maintaining type declarations, and we
lose the very powerful ability to define "generic" or
"polymorphic" procedures with the same name but with
parameters of varying types.
Type checking is important in most systems for four
reasons, none of which is very important in Smalltalk :
(20c)
FLoa-t (Ob j eet) >>d.oes NOt Un.d.ersta
Photo 20: Displaying an error in a faulty method.
142
August 1981 © BYTE P ublications Inc
• Without type checking, a program in most languages
can "crash" in mysterious ways at run time. Even with
type checking, most programming systems can crash due
to uninitialized variables, dangling references, etc.
Languages with this feature are sometimes called
"unsafe." Examples of unsafe languages are Pascal, PLll,
and C. Examples of fairly safe languages are BASIC and
LISP. Small talk is a safe language. It cannot be wiped out
by normal programming . In particular, it never crashes
when there are "type mismatches. " It just reports a
"Message not understood" error and helps the programmer quickly find and fix the problem through the notify
window .
.In most systems, the edit-compile-debug cycle is so
tedious that early error detection is indispensable. In
Srnalltalk, type errors are found early in testing, along
with value-range errors and other bugs .
• Type declarations help to document programs. This is
true, but well-chosen variable names and pertinent comments provide more specific information than do type
declarations. A poor documenter can convey as little information in a strongly typed program as in an untyped
program.
.Most compilers can generate more efficient object code
if types are declared. Existing implementations of
Small talk cannot take advantage of type declarations.
We expect that future versions will have that ability. At
that time, type declarations may be added to the
language. They probably will be supplied by the system
rather than the user, using a program-analysis technique
called "type inference."
Project Windows
Photo 21: Project windows in Smalltalk. Each window, when
selected, makes available all the windows associated with that
project.
(22a)
Although overlapping windows enable you to keep the
state of several tasks on the screen at the same time , you
may sometimes be working on several entirely different
projects, each involving several tasks. Small talk lets you
have a different "desk top" for each project. On each desk
top are windows for the tasks involved in that project. To
help you travel from one desk top to another, a desk top
can have one or more project windows that show you
other available desk tops and let you switch to one of
them (photo 21) .
Saving Programs
In unintegrated systems, you create a program using
standard text-editing facilities . Then, using standard utility programs, you can obtain a program listing on paper,
back up the program on other media, and transmit the
program to other people. In an integrated system,
equivalent capabilities must be provided within the
system itself. Some of the program-saving capabilities of
Small talk are described briefly below .
One important facility is the snapshot (photo 22a) . The
entire state of the Small talk environment-including
class and method definitions, data objects, suspended
processes, windows on the screen, and project desk
tops-can be momentarily frozen and saved on secondary storage. The snapshot can be restored later and
resumed. People familiar with the sysout in InterLISP or
the workspace concept in APL will understand the
benefit of this facility .
Another facility allows definitions of one or more
methods or classes to be listed on a printer. A related
facility is filin l filout. The filout message (photo 22b)
writes an ASCII representation of one or more definitions
onto a conventional text file. The definitions can then be
transfused into another Small talk environment by using
the filin message in that environment.
Often, during a programming session, the user changes
a number of method definitions that are scattered
throughout many classes and cannot recall which ones
were changed. The changes facility automatically keeps a
record of what definitions changed in each project, and
makes it easy for the user to filout those definitions at the
end of the session.
(22b)
Photo 22: Recording results in Smalltalk. The current state of
the Small talk system can be saved with "snapshot." Smalltalk
code can be saved to a text file by using "filout " and restored by
using "filin ."
144
August 1981 © BYTE Publications Inc
Implementation of the Environment
Because Small talk is an integrated environment, all the
facilities described in this article are implemented in the
Text continued on page 147
Text continued from page 144:
high-level language, including modeless editing, windows, the compiler, and the notify mechanism. This was
possible because Small talk represents everything, including the dynamic state of its own processes, as objects
that remember their own state and that can be sent
messages by other objects. Using the browser, you can
examine and (carefully) change the definitions of the
software-development aids.
In the implementation of Smalltalk-76, classes InspectWindow, BrowseWindow, and NotifyWindow are all
tiny subclasses of class PanedWindow, which defines
their common behavior. Similarly, classes StackPane,
VariablePane, ValuePane, and so on, are all tiny
subclasses of class ListPane. The superclass defines common behavior such as scrolling and selecting entries.
If someone shows you a system claimed to be
"Smalltalk," find out whether the software-development
aids exist and whether they are programmed as class
definitions in the high-level language. If not, the system is
not bona fide.
Conclusions
The Small talk programming environment is reactive.
That is, the user tells it what to do and it reacts, instead of
the other way around. To enable the user to switch between tasks, the state of the tasks is preserved in instantly
accessible windows that overlap on desk tops . To give
the user the maximum freedom of choice at every moment, modes rarely occur in the user interface. The result
of this organization is that tasks , including softwaredevelopment tasks, can be accomplished with greater
speed and less frustration than is usually encountered in
computer systems . •
References
1.
2.
3.
4.
5.
6.
7.
+--
Sneeringer, J. " User·lnterface Design for Text Editing : A Case
Study." Software-Practice and Experience 8, pages 543 thru
557 , 1978.
Swinehart, D C (thesis). "Copilot: A Multiple Process
Approach to Interactive Programming Systems." Stanford
Artificial Intelligence Laboratory Memo AIM·230, Stanford
University, July 1974.
Kay, A and A Goldberg. "Personal Dynamic Media." Computer, March 1977 (originally published as Xerox PARC
Technical Report SSL-76-1 , March 1976, out of print).
English, W, D Engelbart, and M Berman . " Display-Selection
Techniques for Text Manipulation ." IEEE Transactions on
Human Factors in Electronics, volume 8, number 1, pages 21
thru 31 , 1977.
Card, S, T Moran, and A Newell. "The Keystroke-Level Model
for User Performance Time with Interactive Systems ." Communications of the ACM, volume 23, number 7, July 1980.
Goldberg, A and D Robson. "A Metaphor for User-Interface
Design ." Proceedings of the Twelfth Hawaii International Conference on System Sciences, volume 6, number 1, pages 148
thru 157, 1979.
Borning , A. " Thing Lab-A Constraint-Oriented Simulation
Laboratory." To appear in ACM Transactions on Programming
Languages and Systems (originally published as Stanford
Computer Science Report STAN-CS-79-746 and Xerox PARC
Technical Report SSL-79-3, July 1979, out of print).
Circle 38 on Inquiry card.
65K 5-100 DYNAMIC MEMORY
BY FAMOUS NAME MANUFACTURER
unbelievable price:
$299
FEATURES: Fully Compatible with IEEE-696. Assembled. tested
and fully populated with 65K of 200 ns. brand name memory
Bank selectable. 4Mhz. operat ion. extended addressing. invisible
refresh 8/ 16 bit opera tion (per IEEE-696) and many other fea tures.
One yea r warranty. manual included ... Hurry, limited quantities!
TELEVIDEO TERMINALS:
Model 912C
... . 695.00
Model 920C
.. 720.00
New! Model 950 ..... ... 995.00
EPSON PRINTERS:
Model MX-70 ........... SCA LL
Model MX -80
.. $CA LL
Q.T. COMPUTER SYSTEMS:
MODEL
DESCRIPTION fALL ASSEMBLED & TESTED I .
. ..... PRICE
MF+ DD1 2A ... 25 A. Mainlrame: 12 Siol. S100. Dual 8" Drive .$625.00
MF+ 18A ..... . 25 A. Tabletop Mainlrame: 18 Sial. S100 ....... 450.00
MF+12A
... 25 A Mainframe 12 Sial. S100. Dual 5" Drive .. 45000
Z +80A ........ Single Board . Z -80 Computer 2/4 Mhz . S- l 00 .. 185.00
Z+80A /2.2 .... Monilor Program for Z+80A & Tarbell or VF-l .. . . 30.00
RAM 32
.. 32K Sialic RAM Board . Low Power. S- l 00
.. 49900
QTCIOA ...... 2 Serial & 4 Parallel Port I/ O. S-100 ........... 33900
OTCCCSA .... Clock Calendar Board . S-l 00 .. .....
. . 12500
QTCCCAA ... . Clock Ca lenda r Board. for Apple ... .. . . _. . . . 125.00
. 12500
QTCCCTRS80 Clock Calendar Modul e for TR S-80 .
VISTA COMPUTER COMPANY:
MODEL
DESCRIPTION fALL ASSFMBLED & TESTEDI .
."
PRICE
V300 / 25 .. Letter Quality Prinler. 25 CPS.
. .. . ... $1895 00
V300 / 45 .. Leller Qualfly Printer. 45 CPS ... .. . . .. ........ . . 2195.00
V-DRIVE .. Dual 8" Disk Cabinel. Power Supply. Rack Mounlable .. · 375.00
COMPUTER SYSTEM RESOURCES:
MODEL
DESCRIPTION IALL ASSEMBLED & TESTED I
. . ..... . . . . . .
PRICE
RAM 16 ... 16K Sialic RAM. S- IOO .... .. ...........
. S18900
RAM 16C . Low Power (CMOS) VerSion of RAM 16. 1.3 Wall .... 259.00
RAM 65 ... 16K Sialic RAM. I/O POri Bank Select. S-100 .. . .. 19900
RAM 65C . Low Power (CMOS ) Version of RAM 65. 1 4 Wall ... 279 00
RAM 32 ... 32K Low Power 8 / 1q Bil Stalic RAM. Fully IEE E 696 49900
RAM 256 .. 256K 8 / 16 Bil Dynamic RAM. Fully IEEE 696 ..... 129500
1/ 0-8 ... . . 8 Port Serial I/ O. Fully IEEE. up 10 200K BAUD ..... 39500
ORDERING INFORMATION:
Minimum Order is $15.00. Prices quoted do not include shipping
and handling. Foreign orders require prepaym ent by MICR or
Money Order in U.S. funds . Purchase Orders accepted from U.S.
Government & firms with published A 1 Rating from Dunn &
Bradstreet. Al l other orders require prepayment. charge ca rd.
or COD shipment
TOLL-FREE PHONE NUM BER:
Call Toll-Free 1-800-555- 1212. and ask the operator for our New.
Toll-Free (800) Number. In Alaska . California. and Hawaii. ca ll us
collect at (2 13) 883 -3244 .
TO RECIEVE OUR FREE CATALOG:
Call our Toll-Free (800) number. or ci rcle Reader Service #.
7131 OWENSMOUTH AVE. / #21D
CANOGA PARK, CALIFORNIA 91303
Jl'IIDVAT'1J
. . .,
213 / 883-3244
Circle 168 o n inquiry ca rd.
August 1981 © BYTE Publications Inc
147