← Macintosh Programming Secrets

Macintosh Programming Secrets

From the originals

13 scans

Machine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.

These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.

Image 1

Macintosh™ Programming Secrets

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

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
PDF page 1

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

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
PDF page 2

MACINTOSH PROGRAMMING SECRETS

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
PDF page 3

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
PDF page 4

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
PDF page 5

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
PDF page 6

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
PDF page 7

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
PDF page 8

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
PDF page 9

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
PDF page 10

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
PDF page 11

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