Serious About MPW
Volume Number: 3
Issue Number: 4
Column Tag: Advanced Mac'ing
Getting Serious About MPW
By Frank Alviani, Chief Tool Maker, Odesta, Inc., MacTutor
Contributing Editor
Introduction
We had all just hunkered down into our seats with some fresh coffee when The
Boss wandered in to get the department meeting going. He had been talking a lot about
"improving our productivity" lately, and word was going around that we were soon
going to be switched from the Good Ol' Lisa to MPW.
"Alviani", he started off with (a bad sign for sure), "you've got a lot more
experience with different environments than most of the guys here" (and a lot more
gray, I thought to myself), "and you spend your time building tools for the rest of the
staff, so I've decided to let you be the first to switch over to Apple's new MPW system. I
want you to figure out how to actually use the dang thing, which the manuals sure keep
me from finding out. Find the bugs, build procedures, squeeze the daylights out of it...
Great, I thought to myself above the rising crescendo of patriotic brass band
music, I get to play human mine detector......
MPW (which stands for Macintosh Programmers' Workshop) has recently
become available to the world thru APDA, and, like most revolutions, has polarized
most people into 'fer it' and 'agin it' camps. I have no intentions of trying to carry out
religious conversions in this article; instead, I'd like to spend some time clarifying the
(often excessively terse) MPW reference documentation and providing some "hints and
tricks" material on how to use it.
I should state before going any further that the documentation that comes with
MPW makes no pretense of being anything other than reference material, which is not
terribly unreasonable: the MPW and assembler manuals are already 2.5" thick and
weigh 5 lbs. The Pascal and C manuals are each about 1" thick. Thus, if you have the
entire package, there's 4.5" - 5" of reading ahead of you (add another 1" for MacApp).
Including tutorials for each component would require Apple to ship MPW by truck.
(Besides, I'd have a much worse chance of getting Dave Smith to print this article if
there were first-rate tutorials included....)
Also, let me emphasize that I assume you have the MPW documentation to refer to
when reading this - I am trying to clarify the reference material, not repeat it. I am
working from version 1.0, APDA draft of October 3, 1986 (the latest shipped from
APDA at the time of writing).
What is MPW and who is it aimed at?
MPW is an easily extensible integrated environment, inspired by the famous
UNIX programmers' workbench. The Think Technology products, Lightspeed Câ„¢ and
Lightspeed Pascalâ„¢, are also integrated environments, although language- specific
ones.
The MPW environment, like the UNIX workbench, is command-line oriented,
with the ability to specify options on the command lines, etc. While this may seem like
a reversion to a more primitive time, there are several advantages to this approach
when programming:
(1)The method of executing commands is quite flexible. You can select any text in any
window (using standard editing methods) and simply execute it. The
"Instructions" files that come with the various language packages, for example,
use this approach by embedding commands in the explanatory text and telling you
to select and execute them to build a specific program.
(2)Unlike UNIX, the worksheet that you usually work from is a normal text window.
This means that a number of commands can be typed and checked before execution.
Commands that you need repeatedly are simply left in the window and re-selected
when needed again. If you need to execute a command repeatedly with a set of
run-time options, they are set once when typed on the command line, rather than
being selected each time from the menu bar.
Shell variables and command files allow MPW to be totally and precisely
configured for a specific purpose, and changed easily when needed. User-built Tools,
properly configured, have all the freedom of those shipped with MPW, and allow it to
be extended virtually indefinitely.
MPW is aimed at larger, multi-file projects, rather than at quicky, "one-off
programs, where it would be overkill. There is definitely a learning curve associated
with MPW, but the results allow you to automate most of the mechanics of working
with large projects, freeing you to concentrate on the actual programs (which is
already complex enough). In addition, once you've gotten the hang of writing command
files, etc., there is a certain glee in watching them execute that's like watching a piece
of Victorian clockwork in action!
In short, MPW is rather complex for somebody trying to learn the Macintosh,
but is extremely nice for somebody already familiar with the Mac. Once you've worked