Macintosh Programming Secrets
From the originals
13 scansMachine-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
Addison-Wesley Publishing Company SCOTT KNASTER Macintosh™ Programming Secrets Includes Macintosh™ SE and Macintosh™ II
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
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, 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
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 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
PDF page 3
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
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 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
PDF page 5
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
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 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
PDF page 8
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
PDF page 9
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
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 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
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.
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