← Programming For System 7 1991

Programming For System 7 1991

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

SERIES EDITOR SCOTT KNASTER Macintosh Inside Out Programming F O R System 7 GARY LITTLE TIM SWIHART

A book cover with a lavender background, a purple downward-pointing triangle at top holding the series name, large black and purple display lettering for the title over a yellow band, and author names in serif capitals at the bottom, framed by green, blue and pink edge stripes.

Reading notes: The word 'FOR' is set in small spaced capitals arcing between 'Programming' and 'System 7', so reading order may vary. Series line 'SERIES EDITOR' and 'SCOTT KNASTER' are set in a navy band and read left to right as printed.

Printed product names
Macintosh Inside Out · System 7
Languages
English
PDF page 1

Programming for System 7

SERIES EDITOR Macintosh Inside Out SCOTT KNASTER Programming FOR System 7 GARY LITTLE TIM SWIHART

A book cover with a lavender background, a purple downward-pointing triangle at top holding the series name, large black and purple stylized title lettering over yellow and pink geometric shapes, and author names in spaced capitals at the bottom.

Reading notes: The series title 'Macintosh Inside Out' is set inside a downward triangle and its reading order relative to 'SERIES EDITOR' and 'SCOTT KNASTER' on the top band may be ambiguous. The small 'FOR' is set in spaced letters along an arc and is included in the transcript as a single word.

Printed product names
Macintosh Inside Out · System 7
Languages
English
PDF page 2

The image is a fully blank white page with no artwork, layout elements, or printed marks visible.

Reading notes: The image contains no visible text, so the transcript and printed fields are empty.

PDF page 3

Programming for System 7

Programming for System 7 Gary Little Tim Swihart £. TT 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 Paris Seoul Milan Mexico City Taipei

Languages
English
PDF page 4

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 or all capital letters. The authors and publishers have taken care in preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. Library of Congress Cataloging-in-Publication Data Little, Gary B., 1954- Programming for System 7 I Gary Little, Tim Swihart. p. cm. -- (Macintosh inside out) Includes bibliographical references and index. ISBN 0-201-56770-9 1. Macintosh (Computer)--Programming. 2. Operating systems (Computers) 3. System 7. I. Swihart, Tim. II. Title. III. Series. QA76.8.M3L5831991 005.265--dc20 91-18050 CIP Copyright © 1991 by Gary Little 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 Ronn Campisi Set in 10-pt Palatino by Scot Graphics Sponsoring Editor: Carole McClendon Project Editors: Debbie McKenna and Joanne Clapp Fullagar Technical Reviewer: Jim Luther 1 2 3 4 5 6 7 8 9-MW-9594939291 First printing, September 1991

Reading notes: Library of Congress control number and call number run together in source (QA76.8.M3L5831991, 91-18050) and may be misspaced

Printed dates
1954 · 1991 · September 1991
Languages
English
PDF page 5

For my two favorite Little people: my wife Pamela, and daughter Adrienne (GL) To my wife Avery, for putting up with my very late nights and preoccupation with System 7 while I worked on this book (TS)

Reading notes: Source text contains two dedication entries with initials (GL) and (TS) and differing spouse names (Pamela, Avery), which may indicate an inconsistency or editing issue.

Languages
English
PDF page 6

_.. Contents Foreword by Scott Knaster xiii Preface xv 1. Preparing for System 7 1 System 7 or Bust! 5 Hello! Hello! System 7, Are You There? 6 A Skeleton in the Closet 10 Summary 41 2. Dealing with Files 43 Identifying Files 44 File 1/0 Operations 44 Searching Volumes 51 Special Folders 57 Alias Records and Alias Files 60 Preserving Aliases for Updated Files 62 Alias Files 62 The Standard File Package Customized Open File and Save File Dialog Boxes 70 Writing Dialog-Hook Procedures 75 An Example of Using CustomGetFile 78 An Example of Using CustomPutFile 83 Summary 86 vii

Reading notes: Source is a table of contents excerpt with no advertised products, prices or dates Heading-level text is not clearly marked as a primary headline

Languages
English
PDF page 7

viii ..,. Contents 3. Cooperative Multitasking 87 Running Multiple Applications 88 Switching Between Applications 90 Operating in the Background 92 WaitNextEvent 93 Notification Manager 98 Launching an Application 103 Temporary Memory 106 Process Information 108 Summary 113 4. Apple Events 115 Preparing for High-Level Events 116 The High-Level Event Mechanism 119 Addressing a High-Level Event 120 Receiving a High-Level Event 126 Apple Event Interprocess Messaging Protocol 127 Apple Event Data Structures 128 Receiving Apple Events 131 Writing an Apple Event Handler 132 Extracting Parameters from an AppleEvent Record 133 Handling Lists of Descriptor Records 136 Determining the Size of Parameters and Attributes 137 Checking for Completeness 138 User Interaction Decisions 139 Writing an Idle Procedure 141 Error Handling 142 Handling Required Apple Events 143 Sending Apple Events 145 Adding Parameters to an AppleEvent Record 147 Descriptor Lists 148 Sending the Apple Event 149 Checking for Errors 152 Example: Sending an Apple Event to ToolServer 153 Summary 159 5. Edition Manager 161 Edition Manager Overview 162 Edition Manager Menu Items 163 Drawing Borders 166

Reading notes: Table of contents heading 'Contents' is not a primary headline; no advertised products, prices, or dates present

Languages
English
PDF page 8

Sections 167 Creating New Sections 169 Section Management 170 Loading and Saving Sections 171 Registering and Unregistering Sections 176 Associating Sections 177 Publishing 178 Publisher Previews 181 Creating Editions 181 Opening Editions 182 Publishing Sections 183 Closing Editions 184 Subscribing 189 Publisher and Subscriber Options 193 Publisher Options 193 Subscriber Options 196 Apple Events Used by the Edition Manager 199 Cancel Section 201 Read Section 201 Scroll Section 203 Write Section 203 Summary 210 6. Communications Toolbox 211 Communications Toolbox Managers 212 Connection Tools 214 The ConnRecord Structure 214 Determining a Connection Tool's Name 217 Creating a ConnRecord 218 Opening a Connection 219 Writing to the Connection 220 Reading from the Connection 223 Closing and Disposing of the Connection 224 Terminal Emulation Tools 225 The TermRecord Structure 225 The TermDataBlock Structure 230 Determining a Terminal Emulation Tool's Name 230 Caring for the Environment 231 Required Procedures for Terminal Emulation Tools 232 IJll- Contents ix

Reading notes: Source is a table of contents with page numbers; no advertised products, prices, or dates present. Line-break hyphenation and spacing artifacts may affect exact section titles.

Languages
English
PDF page 9

x ._ Contents Optional Procedures for Terminal Emulation Tools 236 Creating a TermRecord 237 Writing Data to the Terminal 239 Reading Data from the Terminal 240 Disposing of the Terminal Emulation 241 Event Handling 242 Activate Events 243 Update Events 244 Keyboard Events 244 Mouse-Down Events 244 Suspend/Resume Events 245 Configuring the Communications Toolbox Tools 245 Configuring Terminal Emulation Tools 246 Configuring Connection Tools 250 Putting the Pieces Together 254 Summary 257 7. Font Manager 259 TrueType Scaling 259 Living with Bit-Mapped and TrueType Fonts 260 TrueType's Impact on Applications 261 Incremental Font Size Adjustments 264 Custom Font Size Selection 266 Implementing Custom Size Control 268 User Interface Tip 273 Special Characters 275 Summary 276 8. Balloon Help 277 What Help Balloons Look Like 278 Balloon Help Resources 280 Balloon Help for Menus and Menu Items 282 Dynamic Menu Items 285 Adding Items to the Help Menu 287 Balloon Help for Dialogs and Alerts 290 Using 'hdlg' Resources 291 Using 'hrct' Resources 295 Testing Help Balloons 296 Balloon Help for Standard Windows 297 Using 'hwin' Resources with Dialogs and Alerts 299 Windows with Dynamic Objects 300 Summary 305

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

Languages
English
PDF page 10

9. Fit and Finish 307 Icons, Signatures, and Bundles 308 Icon Families 308 Signature Resources 313 'BNDL' Resources 314 Version Information 316 Finder Help Balloons for Applications 318 Leaving a Calling Card with Documents 320 File Comments 323 Reading Comments 324 Saving Comments 326 Summary 328 Appendix A A Rez Primer 329 Appendix B The 'SIZE' Resource 335 ~ Contents xi Appendix C Support for Macintosh Programmers 341 Appendix D Bibliography for Macintosh Programmers 345 Index 349

Reading notes: Source appears to be a table of contents with no advertised products, prices, or dates Heading position unclear; no primary headline identified

Languages
English
PDF page 11

Foreword by Scott Knaster On May 13, 1991, Apple introduced Macintosh System 7, the culmination of the greatest software effort in Apple's history. There was so much stuff in System 7 that it took Apple three Worldwide Developers' Conferences to get it out the door. So far, it looks like all the hard work was worth it (this is especially easy for me to say, since I didn't have to do any of the work). I'm running System 7, and you probably are, too. In fact, I started running a pre-release version of System 7 several months before it shipped, and I was the proverbial first one on my block to have it. Although I had to be very considerate of my System 6 neighbors when I printed (there was no way to avoid laser printer wars at that time, so every time I printed, the next unlucky System 6 user had to reset the printer), I really didn't want to think about going back to System 6. System 7 provided Apple with a chance to give its users a bunch of great new stuff, and there's something in there for everyone. I love the way I'm in control of the Apple menu, and I can now really file things the way I want to, thanks to aliases. File Sharing is wonderful, especially at home, where I share a LocalTalk network with my wife (no more eye injuries from misplaced floppies tossed my way). There are a bunch of neat new things in the Finder, including a real live Find command! I know that there have been third-party utilities available for years that do many of these things. I've used some of them, and I've even known some of the fine programmers who created them. When Apple builds these features into the official System and Finder, though, it's good for xiii

Reading notes: Trailing page marker 'xiii' at end of excerpt is ambiguous and may not belong to the body text Heading 'Foreword by Scott Knaster' is spaced unusually; primary heading is unclear

Printed product names
Macintosh System 7 · System 6 · LocalTalk
Printed dates
May 13, 1991
Languages
English