# Macintosh Programming Secrets — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/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-secrets-1988-723a8d/1#scan-85cc8aeef6d78d07b7105018b8e32c4b35a3a407fdcda1dfec4c3f3f7957ad86)

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, a black background, a stylized cream-and-black line drawing of a man in a fedora with stubbled face, red outlined title text on the left, and a diagonal blue corner banner in the lower right.

Reading notes: Trademark symbols (™) after Macintosh and the superscript SE and II in the diagonal banner are small and may be approximated. Diagonal banner text reads upward at an angle; reading order is inferred.

Languages: English

[Original Image 1](https://www.vintageapple.net/files/d152dff616334f4d0bf237a253d5d1e29be5c3983890861019235280c741490a/58bb8db6c4e2b42f65fff3ea.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-6313939ecd104d15a531c5987e1422bac98d1671e58666ebf54764ec090b5c8a)

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, a stylized cream-colored line drawing of a man in a fedora-like hat viewed in profile with stippled shading, and a diagonal blue corner band at lower right.

Reading notes: Trademark symbols (™) after Macintosh are small and may be approximated. Diagonal blue band text 'Includes Macintosh SE and Macintosh II' is rotated and read from the image; superscript ™ marks placement is approximate.

Printed product names: Macintosh™ SE · Macintosh™ II

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-589cf92d1ca2dd090ad1417b094f4d6d1840f7cdf65acea691a727670c8f34ed)

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   Bogota

Reading notes: Transcript intentionally left empty because the exact extracted text is preserved separately; other fields come only from the supplied copy. The supplied copy has no visible prices or dates; the page appears to be a book cover or title page rather than an advertisement. Artwork, colors, and spatial layout were not visible in the supplied text, so the visual description is limited. The publisher city list (Reading, Menlo Park, New York, Don Mills, Wokingham, Amsterdam, Bonn, Sydney, Singapore, Tokyo, Madrid, Bogota) is imprint text and was not treated as advertised content. The ellipsis mark '... ~' after the author name is uncertain as to whether it is decorative or a printed glyph.

Printed product names: Macintosh Programming Secrets

Languages: English

[Original PDF page 2](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-0b75fe2ce9b6517de0e7197e89a8fa315e02ae435bf9a85496e5cecf8bf45743)

Transcribed text:

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.
Library of Congress Cataloging-in-Publication Data
Knaster,   Scott.
Macintosh programming secrets.
Includes index.
1.   Macintosh (Computer)-Programming.   I.   Title.
QA76.8.M3K683 1987   005.265   87-19374
ISBN   0-201-06661-0
Copyright© 1988 by   Scott   Knaster.
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.
Cover design by Doliber   Skeffington
Text design by BMR, David Crossman
Set   in 10/12 Palatino by BMR
0-201-06661-0   ABCDEFGHIJ-HA-8987
First printing, November, 1987

Reading notes: Catalog numbers and code strings such as QA76.8.M3K683 1987 and 005.265 are reproduced as printed and may need verification. Spacing in the cataloging block and the copyright line is irregular, which may reflect layout rather than content.

Printed product names: Macintosh

Printed dates: 1988 · 1987 · November, 1987 · 87-19374 · QA76.8.M3K683 1987 · 005.265

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-df32a3cfd4ccdcf4b0b30ba5a31da9520529392a63d48d1b5cb28bc608d99f2a)

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
with 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.
iii

Reading notes: Spacing in 'Apple   II' and hyphenated 'com-puter' may reflect line-break artifacts

Printed product names: Macintosh

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-37d5d17142581dc6d7955bad3c75654ec075b62abcba448ba5e3a612acd3dfa6)

Transcribed text:

iv   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

Printed product names: Macintosh

Printed dates: August, 1987

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-678cd581c00d8fe47a957c206e12711de2bc1a9d53f888bf3db5e09a3918b856)

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/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-ab23b4feba8231ff51def6af5ae68bfe1d9bec25cb9d0a63a1c3eff6b2568648)

Transcribed text:

Contents
Introduction   xi
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
vii

Reading notes: Table of contents page with page numbers; no advertised products, prices, or dates present.

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-3ac681a71053131f67046c93d3bfd6ccc96667c585ba7538ecfc5ba62e7adeac)

Transcribed text:

viii   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 appears to be a table of contents with page numbers rather than advertising copy; no headline, products, prices or dates are explicitly advertised.

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-f92b4378138a01f4fa788fb04f9dc05f942db2edc067d074507899d2995fbf8d)

Transcribed text:

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

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-4b740672fd55cc1c0423337332e984abdc5ecfd408471d464510f42222cabbb9)

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
xi

Reading notes: Page number 'xi' at end of excerpt may be a page marker rather than content.

Printed product names: Macintosh II · Toolbox

Printed dates: 1984

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/1#scan-78ab64c9d3c68550a03f1c240d7c16bb2558c8002077570c0bad9c7284873700)

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.

Reading notes: Chapter 5 and Appendix 'Macintosh Technical Note #110' names are inferred from running text rather than a formal heading, and the copy contains no explicit primary heading.

Printed product names: Macintosh SE · Macintosh II · LaserWriter · Macintosh Technical Note #110

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/24571c2a3b63d6e7c8a37eef3780150057e2f97a4357de1776ee70e0500cb5c7/Macintosh_Programming_Secrets_1988.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-secrets-1988-723a8d/2.md)
