# Programmer’s Guide to MPW, Volume I — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### Image 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-15020a8964c32e02e0e80a0948d274748d46e05868576258d70c7bf6dae97403)

Transcribed text:

SERIES EDITOR SCOTT KNASTER
Macintosh Inside Out
Volume I
Programmer's Guide to MPW®
Exploring the Macintosh® Programmer's Workshop
MARK ANDREWS

Image description: Book cover with a peach-to-yellow gradient background, a magenta downward-pointing triangle labeled Macintosh Inside Out, large black serif title text, and the magenta letters MPW set on a lavender tilted panel, with a blue-and-white band across the top.

Reading notes: Series editor name and top band text are small and partly stylized; transcribed as shown. Spacing in the italic subtitle 'Exploring the Macintosh Programmer's Workshop' is stylized and may not reflect exact word spacing.

Printed product names: MPW · Macintosh Programmer's Workshop

Languages: English

[Original Image 1](https://www.vintageapple.net/files/69a9be94605d1bb02d60ca6cfdc748a0b1d00df95d332c914259524c5c5b8802/va-programmers-guide-to-mpw-1990-218da8.png)

### Image 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-33ddd61634a3c5d65657de43b7041717fe2b5aa0b8a6aec6814ea026a5c061c4)

Transcribed text:

File Edit Find Mark Window Project Directory Build

Shiva:MPW 3.2:Worksheet

MPW Shell

# Macintosh Programmer's Workshop 3.2
#
# Copyright Apple Computer, Inc. 1985-1990
# All rights reserved.

Help Projector
Projector
    Projector is a collection of built-in MPW commands and windows that help programmers (both individuals and teams) control and account for changes to all the files (documentation, source, applications etc.) associated with a software project.

    Here is a brief summary of the commands (the CheckIn, CheckOut, and NewProject commands also have windows that can be opened using the "-w" option to the respective command):

    Help CheckIn          # check a file into a project
    Help CheckOut         # check a file out from a project
    Help CheckOutDir      # specify the directory where checked out files will pl
    Help DeleteNames      # delete user-defined symbolic names
    Help DeleteRevisions  # delete previous revisions of files in a project
    Help ModifyReadOnly   # enables a read-only Projector file to be edited
    Help MountProject     # mount projects

Image description: A screenshot of the Macintosh MPW Shell worksheet window showing monospaced help text for the Projector commands on a classic Mac OS menu bar and window frame.

Reading notes: The rightmost text on the CheckOutDir line is cut off at the window edge (reads 'will pl' partially visible). Screen capture rather than printed advertisement; text is typed UI output.

Printed dates: 1985-1990

Languages: English

[Original Image 3](https://www.vintageapple.net/files/61195b86a98c4c39f06630ff5128d6e19d6992c43cb2242dee6ec9facadfb5fb/macintosh-programmer-s-workshop-documentary.png)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-14f42ed96d0908622520c5960ba0e68572fafdbf185fca42250ea9748044bd3d)

Transcribed text:

SERIES EDITOR SCOTT KNASTER

Macintosh Inside Out

Volume I

Programmer's Guide to MPW®

Exploring the Macintosh® Programmer's Workshop

MARK ANDREWS

Image description: A book cover with a peach-to-yellow gradient background, a magenta downward-pointing triangle at top containing 'Macintosh Inside Out', a yellow circle behind the title, and large black serif headline text with 'MPW' in magenta on a lavender tilted panel.

Reading notes: 'Volume I' is set along a curved arc and read as a separate element; reading order placed it after the series banner. Series banner text 'SERIES EDITOR' and 'SCOTT KNASTER' are on the same blue band and were read left to right. Trademark symbols (®) are transcribed as printed after MPW and Macintosh.

Printed product names: MPW · Macintosh Programmer's Workshop

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-d24df1afd87bb45cddd2c004ab138e4cadbd6e894a4b517be8e5dad481f56618)

Image description: The image is a entirely blank white page with no visible artwork, layout elements, or text.

Reading notes: No visible text or graphics appear anywhere on the page, so the transcript and all printed fields are empty.

[Original PDF page 2](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-bcd7d04901f28512216193ca9bc4fe0ebe9eea05a1712c420ea29bdceaf80c2e)

Programmer's Guide to MPW, Volume I

Transcribed text:

Programmer's Guide
to MPW®,   Volume   I
Exploring   the Macintosh®
Programmer's Workshop
Mark Andrews
Addison-Wesley Publishing Company, Inc.
Reading, Massachusetts   Menlo Park, California   New York
Don Mills,   Ontario   Wokingham, England   Amsterdam   Bonn
Sydney   Singapore   Tokyo   Madrid   San Juan

Printed product names: MPW · Macintosh

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-8b2ccbd60196b8dbc6aeae331d4c580c47678da8619a5d2c7c0256b029228090)

Programmer's guide to MPW I Mark Andrews.

Transcribed text:

Library of Congress Cataloging-in-Publication Data
Andrews, Mark.
Programmer's   guide to   MPW   I   Mark Andrews.
p.   cm. -   (Macintosh inside out)
Includes bibliographical references and index.
Contents: v. 1. Exploring the Macintosh programmer's workshop
ISBN   0-201-57011-4   (v. 1)
1. Macintosh (Computer)-Programming. 2.   MPW   (Computer
system). I. Title. II. Series.
QA76.8.M3A59   1990
005.265-dc20   90-48237
CIP
Many of the designations used by manufacturers and sellers to
distinguish their products are claimed as trademarks. Where those
designations appear in this book and Addison-Wesley was aware of a
trademark claim, the designations have been printed in initial capital
letters.
Copyright© 1991 by Mark Andrews
All rights reserved. No part of this publication may be reproduced,
stored in a retrieval system or transmitted, in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise,
without the prior written permission of the publisher.   Printed   in the
United States of America.   Published   simultaneously in Canada.
Sponsoring Editor: Carole McClendon
Technical Reviewer: Nick   Pilch
Cover Design: Ronn Campisi
Text Design: Copenhaver Cumpston
Set in   10.5   point   Palatine   by ST Associates, Inc.
ISBN   0-201-57011-4
ABCDEFGHIJ-MW-91
First printing, December   1990

Reading notes: Headline is a cataloging-style title line rather than a display heading; exact heading uncertain.

Printed dates: 1990 · 1991 · December 1990

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-215e7340c62c01f95f6e9bae1dfca13e7ecee0d6e3f53164d69fe6d3e085ab88)

Image description: The image is a blank white page with no visible artwork, layout, or text.

[Original PDF page 5](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-60bd0d20f0d53461caf71d3359a20c42275b141a771b4984be64159795f346c2)

Transcribed text:

~   Contents
Preface   xix
Acknowledgments   xxvii
PART   ONE   THE MPW SHELL   l
1.   MPW and the Macintosh   3
The Macintosh   Story   4
The Mouse, the Lisa, and the Macintosh   5
Lisa Bites the Dust   6
The   MPW   Story   8
Launching   MPW   9
MPW3.0   9
MPW3.2   10
What   You   Need to Run   MPW   3.2   12
Installing   MPW   3.2   12
The Macintosh   User   Interface   13
Principles   of Macintosh Programming   16
An Easier Way to Manage Memory   16
Macintosh   I/O   17
Managing Resources   17
vii

Reading notes: Page numbers and heading levels in the table of contents are ambiguous in OCR-like extraction

Printed product names: Macintosh · Lisa · MPW

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-4eb76db2f86f521909baecd3f057c81a156958db8888e352b4ad020687c788ce)

Transcribed text:

viii   ~   Contents
Quickdraw and Macintosh Graphics   17
Important Events   18
Other   Features   18
The Macintosh Toolbox and   Operating   System   19
The   User   Interface Toolbox   20
The   System   7 Toolbox   21
The Process Manager   21
The Edition Manager   22
The Help Manager   23
The Graphics Devices Manager   24
The Alias Manager   24
The Database Access Manager   24
The   PPC   Toolbox   24
The   Power   Manager   25
Other Toolbox Managers   25
The Macintosh   Operating   System   29
Unlocking   the Toolbox   33
How the Trap Dispatcher Works   35
Calling the Toolbox from   MPW   35
Calling Traps in   C   36
Calling Traps in Pascal   41
Assembly Language Programming   45
Calling Traps in Assembly Language   46
Making Toolbox Calls in   C++   50
Making Toolbox Calls in MacApp   51
Conclusion   51
2.   Commands and   Scripts   53
The   MPW   Shell   54
The   MPW   Worksheet Window   54
The   Status   Panel   55
The   Split-   Window Feature   55
A Window That's Always   Open   57
The Worksheet Window's Title Bar   57
The TileWindows and StackWindows Commands   57
The Browser Window   57
The Target Window   59

Printed product names: Macintosh · MPW · MacApp

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-7ce04f5efb962b1e408ad9e7a25478d0e4fc86cb0478faecb11f0c5be09361f7)

Transcribed text:

l)i-   Contents   ix
Searching for a   String   in the Target Window   60
The   MPW   Command Language   63
Four Varieties of   MPW   Commands   68
The Structure of a Command   69
Multiple-line Commands   71
Command and Parameter   Syntax   75
How   MPW   Interprets Commands   78
Tips for Writing Command Lines   88
The Help Hotline   91
The Evaluate Command   92
Writing   MPW   Commands   94
Typing and Entering Commands   94
Clearing a Window   94
Options and Parameters in   MPW   Commands   97
Using Parameters with the Beep Command   98
Writing a Script   99
Redirecting Input and Output   99
Variables in   MPW   Commands   102
Kinds of   MPW   Variables   103
Startup Variables   103
Defining Variables with the   Set   Command   106
The Unset Command   108
Parameter Variables   108
Scopes of Variables   110
Extending the   Scope   of a Variable   110
The Export Command   111
The Unexport Command   111
The Execute Command   111
More About the Echo Command   113
The Quote Command   114
Aliases   118
The Unalias Command   118
Making an Alias Permanent   119
The Startup and   UserStartup   Scripts   119
Modifying the Startup Script   122
Modifying the   MPW   Directory Structure   123

Reading notes: Leading characters of the first line are garbled ("l)i-"), so the reading is uncertain. Source appears to be a table of contents without a primary heading, so headline is null. Text is a fragment of a table of contents; reading order is a list of section titles with page numbers.

Printed product names: MPW

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-e16a5f9315d10bb8205d5e6124d87c08361e757d31c839c909c5386b52aa022b)

Transcribed text:

x   ~   Contents
Changing   the   MPW   Screen Display   126
Redefining the (WordSet) Variable   127
Making and Saving   Your   Modifications   127
How Startup   Calls   UserStartup   128
Modifying the UserStartup Script   128
Creating   Aliases in the UserStartup Script   128
Defining Variables in the UserStartup Script   130
User-Defined Variables   131
Creating   a Supplementary UserStartup Script   131
Running   MPW   Without a UserStartup Script   132
Files and Directories   133
How   MPW   Searches for Files   134
Spaces in File and Directory Names   135
Selecting Text with the§   Character   136
Variables in Pathnames   137
Wildcards in File and Directory   Commands   137
Locked and Read-Only Files   137
Examples of File and Directory Commands   138
The Directory   Command   138
The SetDirectory   Command   139
The Files   Command   140
The NewFolder   Command   143
The Volumes   Command   143
The Duplicate   Command   144
The   Catenate   Command   144
The Move   Command   144
The Rename   Command   145
The SetFile   Command   146
The Print   Command   148
Structured Constructs   150
The If   Command   150
The For   Command   150
The Loop   Command   152
The Break   Command   153
The   Continue   Command   154
A Modified Startup Script   154
Conclusion   160

Reading notes: Source appears to be a table of contents with page numbers; no headline or advertised content is present. Some characters appear damaged in the extraction, such as the stray '§' in 'Selecting Text with the§ Character'.

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/1#scan-e72f616ef1713218aca358e1c42937cc679428500b6affe0c822a0671d01ad5a)

Transcribed text:

3.   Menus and Dialogs   161
The   MPW   Menu Structure   162
What's on the Menu   162
The File Menu   164
The Edit Menu   169
The Format Dialog   171
The Find Menu   173
The Find Dialog   174
The Mark Menu   179
The Window Menu   181
The Project Menu   184
The Directory Menu   185
Customizing   MPW   Menus   188
The AddMenu   Command   189
Omitting AddMenu Parameters   189
Creating   a Menu and a Menu Item   190
~   Contents   xi
Adding Menus and Items from a   UserStartup   Script   191
Using   AddMenu to Run a   Script   192
Menu Items for Editing Documents   192
Using   Metacharacters with the AddMenu   Command   194
The DeleteMenu   Command   195
MPW   Dialogs   196
Using   Standard Dialogs in   MPW   196
Commando Dialogs   201
What   You   Can   Do with   Commando   Dialogs   202
An Example: The UserVariable   Commando   202
The Parts of a   Commando   Dialog   203
The   Options   Window   203
The   Command   Line Window   205
The Help Line Window   206
The   OK   Button   206
The   Cancel   Button   207
Some   Unique   Features of the UserVariables   Commando   207
Improving the UserVariables   Script   208
Executing   UserVar   from the Menu   209

Reading notes: Source is a table of contents with page numbers; no advertised products, prices, or dates are present.

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/f78e75eaf49e1dfb9b8459c649cfd147515695c278c84cc08df11320073e7e4f/Programmers_Guide_to_MPW_1990.pdf#page=10)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-programmers-guide-to-mpw-1990-218da8/2.md)
