# Macintosh Programming Secrets — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/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-macintosh-programming-secrets1988-76330c/1#scan-4a7e29b19c3bb08ed6d1853a9d52492fe525212133bdab5f323df4f178180c40)

Macintosh™ Programming Secrets

Transcribed text:

Addison-Wesley Publishing Company
SCOTT KNASTER
Macintosh™
Programming
Secrets
Includes Macintosh™ SE
and Macintosh™ II

Image description: A book cover with a blue top band showing the publisher logo and author name, a black background with red headline text, and a white line-drawn illustration of a man in a fedora hat in profile, with a blue diagonal corner banner reading the included Macintosh models.

Reading notes: The diagonal corner banner text is partially cropped at the image edge, so the final line 'and Macintosh II' and the trademark marks may be incomplete.

Languages: English

[Original Image 1](https://www.vintageapple.net/files/41d68dad4ab40d9fc9cd9964f2d2ea412bf19680dde5c68f5e2c28a9cb6c38f9/db3552865046bc9968c4f18f.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-87615df1fe255f9a5f624dcda2634aa614f59f43e2fe5cf0f900110e5d2b91a3)

Transcribed text:

Addison-Wesley Publishing Company

SCOTT KNASTER

Macintosh™ Programming Secrets

Includes Macintosh™ SE and Macintosh™ II

Image description: A book cover with a black background, a blue top band holding the publisher name and author, and a white stylized silhouette of a figure in a wide-brimmed hat and a hand touching the chin, with red three-dimensional title text on the left and a blue diagonal corner band at the lower right.

Reading notes: The diagonal blue corner band is cut off at the bottom edge, so the 'Includes' line is partially cropped; the lower portion of 'and Macintosh II' is clipped. The trademark symbols (™) after Macintosh and the superscript marks on SE and II are small and approximate in transcription.

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-db193fe380a4392eb668f07c3941f7beb976ad230b331b1870494009db77af92)

MACINTOSH PROGRAMMING SECRETS

Transcribed text:

MACINTOSH
PROGRAMMING
SECRETS
Scott Knaster
... ...... 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

Languages: English

[Original PDF page 2](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-3a6ea77951a38ea458a5be5638fb93d876aa85d8f2dfb83b426ce95dcdbe0491)

Transcribed text:

Many of the d esignations used by manufac turers and sellers to distinguish
their produ cts are claimed as trad em arks. Where those d esigna tions
appear in this book and Addison-Wesley was aware of a trademark cla im,
the d esignations have been printed in in itial capital letters.
Library of Congress Ca taloging-in-Publica tion Data
Knaster, Scott.
Macintosh programming secrets.
Includes index.
1. Macintosh (Com pu ter)-Programming.   I.   Title.
QA76.8.M3K683 1987   005.265   87-1 9374
ISBN   0- 201-06661 - 0
Copyright © 1988 by Scott Knaster.
All rights reserved . No part of this publica tion may be reproduced, stored in
a retrieval system, or transmitted, in an y fo rm or by any means, electronic,
mechanical, photocop ying, recording, or otherwise, w ithout the p rior written
permission of the publisher. Printed in the   United   States of America.
Published simultaneously in Canad a.
Technical edit: Dave Wilson
Cover d esign by Doliber Skeffington
Text design by BMR, David Crossman
Set in   10/12   Palatino by BMR
0-201-06661-0   CDEFGH IJ- HA- 898
Third   Printing,   August   1988

Reading notes: Spacing in the source is irregular in places (e.g., 'd esignations', 'Canad a'), likely from OCR; words were read as their probable intended spelling.

Printed product names: Macintosh

Printed dates: 1987 · 1988 · August 1988

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-72ce646931684e64b033d8d53e92c32c3fda259249dc954d67a757d5dd0c0faa)

Transcribed text:

Foreword
Macintosh has the finest collection of software for any personal com-
puter. You can pick from over   2,500   powerful, easy to use, and elegant
applications. This achievement is the result of the hard work of
many people-programmers, evangelists, writers, and testers, to
name a few.
A few individuals made outstanding personal contributions to
this achievement. Scott Knaster is one of them. For over two years,
Scott was responsible for the technical support of Macintosh and Ap-
ple II developers. He managed a group of zealots who cajoled,
coached, and scolded developers into creating great products.
There are two kinds of computer books.   One   is the result of ad hoc
research on what a publisher thinks will sell. The other is the fruit
of being immersed in a subject for years. This is the latter kind of
book.
In this, his second book, Scott explains more about the art-and
it is an art-of Macintosh programming. This book is the result of
Scott' s living and breathing Macintosh programming. He captures
not only the how but also the why of Macintosh programming.
Scott's insights into Macintosh software are unique because he
worked closely with Apple's software and hardware engineers and
w ith all the Macintosh third-party developers. This book reflects
his inside knowledge of Apple and the synthesis of the techniques of
hundreds of Macintosh programmers.
lll

Reading notes: Stray character 'lll' appears at the end of the copy, possibly a page marker Possible spacing artifacts in 'w ith' and 'Scott' s' from text extraction

Printed product names: Macintosh

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-d6a7dbce627de9acbfdd95e3bf2cb0f22c9dff4130cf6cae8048da523380182b)

Transcribed text:

lV   Foreword
Scott has written a most insightful book on Macintosh program-
ming techniques. Read this book and you'll see that it's not just "how
to program" but a treatise on the Zen of the Macintosh Way. Enjoy.
Guy Kawasaki
August, 1987

Reading notes: Leading page marker 'lV' before the heading 'Foreword' may be an OCR artifact or page number.

Printed dates: August, 1987

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-60e6cb18e0efe1922e0e7b6dd8a1b60d440e2e96c02fa48a6b85e4111b88f21a)

Transcribed text:

Acknowledgments
I created everything in this book. I wrote it, I edited it, I drew all
the figures, I personally made the ink to print it, I chopped down the
trees for the paper, I bound every copy, I sold it, I shipped it. I thank
no one.
Just kidding.
Bill Dawson worked from a crazy idea to produce the Amazing
Journey section, using a method of storytelling I've always wanted to
try.   Steve   Stansel   provided counsel and humor and once threatened
to kill my dog-but I'm even with him because I still have his Lau-
rie Anderson records. Carole Alden stayed with me and helped me
find my way forward. Linda O'Brien is just the greatest. Alain Ross-
mann of Radius, former Apple Chief Evangelist, is the source for the
FPI   rule in Chapter   1.   Jean-Louis Gassee is the inspiration for the
section on making computers "more analog." Guy Kawasaki, my boss
at Acius, let me go home from the startup wars at 7 o'clock often
enough to finish this book. Barbara Knaster created the figures and
helped with just about everything else. Jess Knaster, age one, helped
by moving disks around, opening and closing books, and even trying to
type something now and then.
This one is for my family: my parents,   Shirley   and David; my
grandmother, Pearl Fox; my brother, Ken; my wife, Barbara; and my
son, Jess.
v

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-3e4cc3fafad06b16d6c48302ff57ec2c086e596ffaa6d14cf92fd70393da0574)

Transcribed text:

Contents
Introduction   Xl
About this Book   .   xv
PART   ONE   Concepts and Ideas   1
Chapter 1 Macintosh and   Software   3
A little history   4
The soul of the new machine   5
Hidden factors   7
Success   and failure   9
Standards   11
Ease of learning vs. ease of use   12
The closed computer   14
A close look at the user interface   17
The   FPI   rule   29
Introduction to compatibility   31
Other   Apple utilities   38
Chapter 2 Compatibility   41
v   l l

Reading notes: Text ends with damaged fragment 'v l l' near page numbers

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-cb7cc8a20989aadf1a4ef320a5874ad32d52649d2ab099bb790dac11906355e0)

Transcribed text:

V l l l   Contents
Good relations   42
Let a thousand flowers bloom   43
Designing compatibility   44
Specializing   48
Generality and compatibility   52
Good behavior   54
Levels of interface   57
Usability   59
Medium-level interface   60
Medium-level summary   81
Intermission   83
Amazing Journey   84
PART   TWO   Technical Adventures   95
Chapter 3 Color   97
About color QuickDraw   98
Color drawing models   101
Color structures   102
Things to remember   111
Chapter 4 Event Manager   127
Using   the mouse and keyboard   128
Have it both ways   129
Streamlining   131
Command keys for buttons   134
Localizing   136
Standard   file dialogs   137
Things to remember   137
Chapter 5 Finder   139

Reading notes: Source is a table of contents with page numbers; no advertised products, prices, or dates are present. Some running-head characters such as the leading 'V l l l' appear damaged or uncertain.

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-1cbb22edcf1f0b0cb0f4bf8cd346ffddd5497a95c1eacfc180dc694fe34a17e6)

Transcribed text:

Quitting to another application
Launching and quitting
Chapter 6 Printing Manager
The current printer
Displaying the document's name
General printing information
LaserWriter specifics
Chapter 7 QuickDraw
Bit image updating
The multibit shuffle
Things to remember
Chapter 8 Resource Manager
Restoring the state of things
Things to remember
Chapter 9 Window Manager
Managing your windows
The tiling algorithm
Stacking   and tiling with multiple screens
Things to remember
Appendix A New Machines and System Software
Appendix B   68020   Microprocessor Overview
Appendix C Macintosh Technical Note   #110
Glossary
Ind ex
Contents   lX
140
141
145
146
166
169
170
187
188
208
221
223
224
232
233
234
246
256
263
285
343
349
357
365

Reading notes: Page numbers are listed in a column that may not align exactly with chapter entries.

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-c98da9cb2bfd7080a07c0648adf7b586fc05475f132445b3688719f1f7b1c996)

Transcribed text:

Introduction
This book has two parts with an intermission between them, three
appendices, a glossary, and an index. This introduction will give you
an idea of what to expect.
Part   One,   "Concepts   and   Ideas,"   is the more abstract part of the
book. It focuses on the standards, customs, and software that have
defined Macintosh computers and their user interface since the Mac-
intosh 128K appeared in 1984. Chapter 1,   "Macintosh   and Soft-
ware,"   is about the evolution of the Macintosh and other personal
computers. It includes a discussion of the user interface, and takes a
practical look at which features are important in making software
easy to use. Chapter 2,   "Compatibility,"   tells about how you can
write your software today so that it works on the Macintoshes that
Apple will introduce tomorrow, saving you the trouble of bribing
someone for inside information or digging through Apple's dumpster.
After Chapter 2 you'll find the Intermission, an attempt to impart
some important technical information without being desert dry about
it.   If   you forget that it's educational, it will no doubt be more fun .
Part Two,   "Technical   Adventures,"   contains information on how
things work in the Macintosh world and how you can do special
tricks in your programs. It's organized by topic: most   chapters are
named after an appropriate part of the Toolbox and the chapters are
arranged in alphabetical order by their names. Chapter 3 is the
"Color"   section (not like the color section in your Sunday funnies) ,
which talks about the new stuff Apple has done in the Macintosh II
to make color video possible. Chapter 4,   "Event   Manager,"   tells how
you can set up your applications to work with both mouse clicks and
Xl

Reading notes: Chapter headings are presented in mixed spacing that may reflect OCR line breaks rather than original typography. Final page marker 'Xl' is unclear and may be a damaged character.

Printed product names: Macintosh II

Printed dates: 1984

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/1#scan-ae770914bad3da6a544cc95e5b27c21f0dd8fc510d05b9e978d774ebb41324c7)

Transcribed text:

xii   Introduction
keystrokes. Chapter 5,   "Finder,"   discusses the technique of quitting
from your application and launching another one directly, without
running the Finder in between.
Chapter 6,   "Printing   Manager,"   discusses the trick of finding the
icon for the currently selected printer, branches into a more general
technique for finding any file's icon, and then gets into some of the
special features of the LaserWriter and how to get at them from your
programs. Chapter 7,   "QuickDraw,"   describes the technique of
drawing things quickly by using off-screen bit images and pixel im-
ages; it also covers a little about using color. Chapter 8,   "Resource
Manager," tells about how you can make your programs super-
friendly by putting everything back the way it was when the user
was last working. Chapter 9,   "Window   Manager,"   explains how you
can deal with the proliferation of windows on giant screens that's
happening in the Macintosh world.
Appendix A,   "New   Machines and   System   Software,"   presents an
overview of the Macintosh   SE   and Macintosh II, plus information
about new features in system files with version numbers of 4.1 or
greater. As the navigator said in the movie   Dune:   "Many   machines.
New machines." Appendix B,   "68020   Microprocessor   Overview,"
goes into the 68020 that's built into every Macintosh II and is avail-
able as a third-party option for other Macintosh computers. Appen-
dix C,   "Macintosh   Technical Note   #110,"   is the saga of an interesting
piece of technical information, which has been circulating among
Macintosh techies for some time. After the appendices is a glossary
of some important terms as well as an index.
Conventions
This is a guide to the way things are represented in this book.
All words that are in   boldface   type have entries in the glossary.
Hexadecimal numbers are always preceded by a dollar sign, as in
$48, $FFFF, and $AD6. Numbers without a dollar sign are decimal
numbers, unless it says otherwise.
You can watch for several kinds of special paragraphs that
break up the prose. They look like this:
These paragraphs contain information that's a little bit off the
subject, but interesting.   If   you're in a hurry or you don't care, you can
skip these paragraphs without losing track of what's going on in the
book.

Printed product names: Macintosh SE · Macintosh II · LaserWriter

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/6344a48d608babd1dbbdb2cf6e9fbeb385baa44d9563e4100e6c0af20e0596a2/Macintosh_Programming_Secrets1988.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets1988-76330c/2.md)
