← Mac Programming For Dummies 3rd Edition 1999

Mac Programming For Dummies 3rd Edition 1999

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

MAC PROGRAMMING FOR DUMMIES

Figure Out the Basics and Start Programming in No Time! 50 MILLION DUMMIES BOOKS IN PRINT MAC® PROGRAMMING FOR DUMMIES® 3RD EDITION Special Coverage of Movie Playing and Other Advanced Programming Topics! A Reference for the Rest of Us!® by Dan Parks Sydow The Fun and Easy Way™ to Create New Mac Programs Your First Aid Kit® for Compiling Source Code with CodeWarrior Lite Complexities of C — Explained in Plain English

A yellow and black book cover with a CD-ROM disc at top left, a gold '50 Million Dummies Books in Print' seal at top right, a black title panel with large yellow lettering, a red starburst badge, and red and yellow lower panels with a white hand graphic and award logos at the bottom left.

Reading notes: The bottom-left author line and award logos are partially cropped at the image edge, so 'A Reference for the Rest of Us!' and the left-side logo text are cut off. The 'by' before Dan Parks Sydow is cropped and partly not visible; it is shown here as partial text. The gold seal text 'MILLION' is partly cut off at the right edge.

Printed product names
Mac Programming for Dummies
Printed dates
3rd Edition
Languages
English
PDF page 1

11 Basics and Figure Out ti e -:nd in No Time! start Programmi.96 Reference for e Rest of Us!' Dan Parks Sydow The Fun and Easy Way"' to Create New Mac Pro/lrams - Your First Aid Kit' for Compiling Soutce Cade with COt/eWamor Ute - Complexities Of C - Explained in Plain English

Reading notes: Headline could not be confidently identified; the title block is fragmented and may be read in the wrong order. Garbled or split fragments in the supplied copy, including 'Programmi.96', 'COt/eWamor Ute', 'Figure Out ti e -:nd in No Time!', and 'Complexities Of C -', may reflect OCR errors or layout breaks. Transcript intentionally left empty per instructions; no product names, prices, or dates were visibly confirmed from the image.

Languages
English
PDF page 2

Mac® l'roframminf For Dummies; 3rtl Edition C Lan9ua9e Data TlJ.pes Use Data Type Example Smallwholenumber short short days = 3 ; Big whole number 1 ong l ong p opulati on = 5600200 ; Decimal numbers f 1oat float secon ds = 42 . 53 ; Event record Event Record EventRecord theEvent ; Wi ndow WindowPtr W indowP t r t heWi ndow ; Rectangle Re ct Rect s mallSquare ; C Lan9ua9e Math In the following examples, assume that all variable s are declared to be of type short. Operation Symbol Example Add~on + newAge = cu rr en tAg e + l; Subtraction 1 os s = tot a 1 damaged ; Multiplication * days = weeks * 7 ; Division I years a months I 12 ; lncrementbyl ++ loopCounter++ ; Important Toolbox Functions In the following examples, assume that t he exampl e va ri ables are declared as follows: t he Event is of type Event Re co rd, thew i ndow is of typ e W i ndo wP tr, and the Rec t is of type Re c t . Task Toolbox Function Get event information WaitNextEvent Open a window GetNewWindow Ready wind ow for drawing Set Port Location to start drawing Move To Draw a line of text Drawstring Draw a line Line Set up a rectang le SetRect Draw a rectangle Fr ameRect Beeping the speaker Sys Beep Exampl e WaitNextEvent(everyEvent . &theEvent . OL . OL) ; GetNewWi ndow ( 128 . ni 1 • (WindowPtr)-lL): SetPo rt(theWindow) ; MoveTo(20 . 50) ; DrawString("\pThis i s a test. " ) ; Line(l00 . 0) : SetRect(&theRect . 10 . 10 . 60 , 80) ; FrameRect(&theRect) ; SysBeep( l ) ; ... For Dummies®: 8estsellin9 Book Series for 8e9inners

Reading notes: Title line is OCR-garbled ('Mac® l'roframminf For Dummies; 3rtl Edition'); headline set to null because it is a running title, not an ad headline, and the exact wording is preserved in the separate extracted text. Several OCR errors in the source copy, including 'Smallwholenumber', 'Big whole number 1 ong l ong p opulati on', 'Add~on', 'Subtraction 1 os s', 'Division I years a months I 12', 'lncrementbyl', 'Wi ndow', 'Re ct', and 'Sys Beep'; these are unverified against the page. Symbol column entries for Division ('I') and Subtraction ('1') are likely misreadings of '/' and '-' and need checking against the image. Section headings 'C Language Data Types', 'C Language Math', and 'Important Toolbox Functions' and the code examples' reading order could not be confirmed from the image itself. Transcript is intentionally empty because the exact extracted text is preserved separately; no prices or dates are present in the supplied copy.

Languages
English
PDF page 3

~ .. Mac® l'roframminf For Dummies; 3rd Edition C Lan9ua9e Basics In the followi ng examples, assume thatthe variable count is declared to be of type short . Task Syntax Example Comment /* *I /* this i s a comment */ Loop while whil e ( count < 5 ) count++ Branch switch switch C count case 1 : DrawString( " \pYou have l ." ) ; break ; Branch if if count < 2 l Dra wSt rin g( " \pLess t han 2 ." ) ; Creatin9 a New Pro9ram Usin9 CodeWarrior Task Create a CodeWarrior project file Create a resourc e file Add resource file to project Remove resource placeholder Create new source code file Save source code file Add source code file to project Remove source code placeholder How to C arry Out Choose New Project from File menu Choose New from ResEdit's File menu Choose Add Files from Project menu Click the plac eholder file and then choose Remove Fil es from Project menu Choose New from File menu Choose Save As from File menu Choose Add Window from Project menu Click the placeholder file and then choose Remove Files fr om Project menu That's up to you! Choose Run from the Project menu • Copyright © 1999 IDG Books Worldwide, Inc. IDG BOOKS WORl.D\\'IDf All rights reserved. Cheat Sheet S2.95 value. Item 0544·0. For more information about IDG Books, ca ll 1·800·762-2974. ... For Dummies® : Bestsellin9 Book Series for Be9inners

Reading notes: Headline and title text contain OCR-like errors (e.g., 'l'roframminf', 'Lan9ua9e') that may not match printed spelling exactly. Price shown as 'S2.95' in source, likely OCR error for '$2.95'; spelling preserved as best as possible.

Printed product names
CodeWarrior · ResEdit
Printed dates
1999
Languages
English · C
PDF page 4

BESTSELLING BOOK SERIES

BESTSELLING BOOK SERIES TM References for the Rest of Us!® Are you intimidated and confused by computers? Do you find · that traditional manuals are overloaded with technical details you'll never use? Do your friends and family always call you to fix simple problems on their PCs? Then the .. .For Dummies® computer book series from IDG Books Worldwide is for you. . • • For Dummies books are written for those frustrated computer users who know they aren't really dumb but find that PC hardware, software, and indeed the unique vocabulary of computing make them feel helpless ..• • For Dummies books use a lighthearted approach, a down-to-earth style, and even cartoons and humorous icons to dispel computer novices' fears and build.their confidence. Lighthearted but not lightweight, these books are a perfect suivival guide for: anyone forced to use a computer. 11 / like my copy so much I told friends; now they bought copies. 11 - Irene C., Orwell, Ohio UD.llick, concise, nontechnical, and humorous. 11 -Jay A., Elburn, Illinois '7hanks, I needed this book. Now I can sleep at night 11 - Robin E, British Columbia, Canada 1/99 Already, millions of satisfied readers agree. They have made .•• • For Du111mies books the #1 introductory level computer book series and have written asking for more. So, if you're looking for the most fun and easy way to learn about computers, look to •• • For Dummies books to give you a helping hand. _ ........ ~-® IDG- BooKS WORLDWIDE

Reading notes: Headline is ambiguous: 'BESTSELLING BOOK SERIES' appears as the top label, and the 'For Dummies' series name is partly obscured by symbols in the copy

Printed product names
For Dummies
Printed dates
1/99
Languages
English
PDF page 5

MAC® PROGRAMMING FOR DUMMIES® 3RD EDITION

White distressed display lettering on a black rectangular panel, centered on a white page, reading the book title with registered-trademark symbols after MAC and DUMMIES and '3RD EDITION' in smaller type at lower right.

Reading notes: Edition number is printed as '3RD EDITION' and is a short ordinal rather than a year; no publication date is visible.

Printed product names
Mac Programming for Dummies
Printed dates
3rd Edition
Languages
English
PDF page 6

NiAC® PROGRANiMING FOR DU!V\MIEO® 3RD EDITION by Dan Parks Sydow ® IDG BOOKS WORLDWIDE IDG Books Worldwide, Inc. An International Data Group Company Foster City, CA • Chicago, IL • Indianapolis, IN • New York, NY

Reading notes: Title line OCR reads 'NiAC' and 'PROGRANiMING' and 'DU!V\MIEO', interpreted as NiAC/Programming for Dummies; verify spelling Author name reads 'Dan Parks Sydow'; verify whether 'Dan Parks Sydow' is the full name

Languages
English
PDF page 7

Mac® Programming For Dummie8¥> 3rd Edition Published by IDG Books Worldwide, Inc. An International Data Group Company 919 E. Hillsdale Blvd. Suite 400 Foster City, CA 94404 www. i dgbooks. com (IDG Books Worldwide Web site) www. dummies. com (Dummies Press Web site) Copyright© 1999 IDG Books Worldwide, Inc. All rights reserved. No part of this book, including interior design, cover design, and icons, may be reproduced or transmitted In any form, by any means (electronic, photocopying, recording, or otherwise) without the prior written permission of the publisher. Library of Congress Catalog Card No.: 99-61115 ISBN: 0-7645-0544-0 Printed In the United States of America 10987654321 30/RW/QT /ZZ/IN Distributed in the United States by IDG Books Worldwide, Inc. Distributed by COG Books Canada Inc. for Canada; by Transworld Publishers Limited in the United Kingdom; by IDG Norge Books for Norway; by IDG Sweden Books for Sweden; by Woodslane Pty. Ltd. for Australia; by Woodslane (NZ) Ltd. for New Zealand; by TransQuest Publishers Pte Ltd. for Singapore, Malaysia, Thailand, Indonesia, and Hong Kong; by ICG Muse, Inc. for Japan; by Norma Comunicaciones S.A. for Colombia; by lntersoft for South Africa; by Le Monde en Tique for France; by International Thomson Publishing for Germany, Austria and Switzerland; by Dlstrlbuidora Cuspide for Argentina; by Llvrarla Cultura for Brazil; by Ediciones ZETA S.C.R. Ltda. for Peru; by WS Computer Publishing Corporation, Inc., for the Phlllppines; by Contemporanea de Ediclones for Venezuela; by Express Computer Distributors for the Caribbean and West Indies; by Micronesia Media Distributor, Inc. for Micronesia; by Grupo Editorial Norma S.A. for Guatemala; by Chips Computadoras S.A. de C.V. for Mexico; by Editorial Norma de Panama S.A. for Panama; by American Bookshops for Finland. Authorized Sales Agent: Anthony Rudkin Associates for the Middle East and North Africa. For general information on IDG Books Worldwide's books In the U.S., please call our Consumer Customer Service department at 800-762-2974. For reseller information, including discounts and premium sales, please call our Reseller Customer Service department at 800-434-3422. For information on where to purchase IDG Books Worldwide's books outside the U.S., please contact our International Sales department at 317-596-5530 or fax 317-596-5692. For consumer information on foreign language translations, please contact our Customer Service department at 1-800-434-3422, fax 317-596-5692, or e-mail rights@idgbooks.com. For information on licensing foreign or domestic rights, please phone + 1-650-655-3109. For sales inquiries and special prices for bulk quantities, please contact our Sales department at 650-655-3200 or write to the address above. For information on using IDG Books Worldwide's books In the classroom or for ordering examination copies, please contact our Educational Sales department at 800-434-2086 or fax 317-596-5499. For press review copies, author interviews, or other publicity information, please contact our Public Relations department at 650-655-3000 or fax 650-655-3299. For authorization to photocopy items for corporate, personal, or educational use, please contact Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, or fax 978-750-4470. YMIT OF IJABILJTYIDiscLAIMER Of WARRANTY: THE PUBLISHER AND AUTHOR HAVE USED THEIR BFST EFFORTS IN PREPARING THIS BOOK. THE PUBLISHER AND AUTHOR MAKE NO REPRFSENTATIONSORW ARRANTIFS WITH RFSPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS BOOK AND SPEClflCAll Y DISCLAIM ANY IMPLIED WARRANTIFS OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THERE ARE NO WARRANTIFS WHICH EXTEND BEYOND THE DESCRIPTIONS CONTAINED IN THIS PARAGRAPH. NO WARRANTY MAY BE CREA TED OR EXTENDED BY SALES REPRFSENTATIVES OR WRITTEN SALES MATERIALS. THE ACCURACY AND COMPLETENESS OF THE INFORMATION PROVIDED HEREIN AND THE OPINIONS STATED HEREIN ARE NOT GUARANTEED OR WARRANTED TO PRODUCE ANY PARTICULAR RFSULTS, AND THE ADVICE AND STRA TEGIFS CONTAINED HEREIN MAY NOT BE SUIT ABLE FOR EVERY INDIVIDUAL. NEITHER THE PUBLISHER NOR AUTHOR SHAU BE IJABLE FOR ANY LOSS Of PROFIT OR ANY OTHER COMMERCIAL DAMAGFS, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENT AL, CONSEQUENTIAL, OR OTHER DAMAGFS. FULFillMENT OF EACH COUPON OFFER IS THE RFSPONSIBIUlY OF THE OFFEROR. Trademarks: All brand names and product names used in this book are trade names, service marks, trademarks, or registered trademarks of their respective owners. IDG Books Worldwide is not associated with any product or vendor mentioned in this book. ~~§~ is a registered trademark or trademark under IDG exclusive license to IDG Books Worldwide, Inc. from International Data Group, Inc. BOOKS in the United States and/or other countries. WORLDWIDE

Reading notes: Several OCR-damaged characters in the warranty and distributor sections (e.g., 'IJABILJTY', 'FRESENTATIONS'), so exact wording is uncertain. Garbled logo text near the trademark notice ('~~§~') makes the publisher imprint uncertain.

Printed dates
1999
Languages
English · French · German · Spanish · Portuguese · Dutch · Italian
PDF page 8

About the Author Dan Parks Sydow is a graduate of Milwaukee School of Engineering, with a degree in Computer Engineering. He has worked on software in several diverse areas, including the display of images of the heart for medical purposes. Because Dan can't stand the sight of blood - even electronic blood - he quit his nine-to-five job as a software engineer to become a freelance writer. Dan got hooked on Macintosh programming a decade and a half ago when the Macintosh was first introduced. Since then, he has spared no effort in avoiding all other types of computers. He enjoys shedding light on topics that people have been led to believe were beyond their reach, and he has written over a dozen Macintosh programming books.

Printed product names
Macintosh
Languages
English
PDF page 9

ABOUT IDG BOOKS WOltLDWIDE Welcome to the world of IDG Books Worldwide. IDG Books Worldwide, Inc .• Is a subsidiary of International Data Group, the world's largest publisher of computer-related infonnation and the leading global provider of information services on information technology. IDG was founded more than 30 years ago by Patrick]. Mc.Govern and now employs more than 9,000 people worldwide. IDG publishes more than 290 computer publitations in over 75 countries. More than 90 million people read one or more COG publications each month. launched in 1,9-90, IDG Books Worldwide is today the # l publisher of best-selling computer bool>s in the United States. We are proud to have received eight awards from rhe Computer Press Association in recognition of editorial excellence and three from Computer Currents' First Annual Readers' Choice Awards. Our best- selling ... for Dummies* series h as more than 50 million copies in print \virh translations in 31 languages. lDG Books Worldwide, through a joint venture with IDG's Hi-Tech Beijing, became the first U.S. publisher to publish a computer book in the People's Republic of China. In record time, !DG Books WorldWide has become the first choice for millions of readers around the world who want LO learn how to better manage their businesses. Our mission is simple: Every one of our books is designed to bring extra value and skill-building instructions to the reader. Our books are wrinen by experts who understand and care about our readers. The knowledge base of our editorial staff comes from years of experience in publishing, education, and joumalism- experience we use to produce books to carry us into the new millennium. In shon, we care abouc books, so we attract the best people. We devote special attention to details such as audience, interior design. use of' icons, and illustralions. And because we use an efficient process of authoring, editing, and desktop publish ing our books electronically, we can spend more time ensuring superior content and less tlme on the technicalilles of making books. You am count on our commitment ro deliver high-quality: l:iooks at competitive prices on topics you want to read aoout. At mG Books Worldwide, we continue in che 1DG trndition of delivering quality for more than 30 years. You'll find no better book on a subject than one from IDG Books Worlclwlde. Elthl Annua Coinputrr Prtn Awczrds~/991 (J,t.._.,.Q~ ... <4- 7 /0ohn Kilcullen <- - Chaim1an and CEO lDG Books Worldwide, Inc. ~ WINNER Nintlt Annual Olmp11ttr Prnt Ait"Grd.f~/99J J~n&f9 President and Publisher IDG Books Worldwide, Inc. ~ WINNE R TtmhAnnual Cam.pultr h tu Awonls ~ / 99J EJ,-iymh nnual CumpulrrPnn AwOJ'ds~ / 995 IDG is the world's leading IT media, research and exposition company. Founded in 1964, IDG had 1997 revenues of $2.05 billion and has more than 9,000 employees worldwide. IDG offers the widest range of media options that reach IT buyers in 75 countries representing 95% of worldwide IT spending. IDG's diverse product and services ponfolio spans six key areas including print publishing, online publishing, expositions and conferences, market research , education and training, and global marketing services. More than 90 million people read one or more of IDG's 290 magazines and newspapers, including l DG's leading global brands - Computerworld , PC World, Network World, Macworld and the Channe World family of publications. IDG Books World,vide is one of the fastest-growing computer book publishers in the world, with more than 700 titles in 36 languages. The " ... For Dummi es~" series alone has more than 50 million copies in print. IDG offers online users the largest network of technology-specifi c Web sites around the world through IDG.ncl (htt p://www.idg.net), which comprises more than 225 targeted Web sites in 55 countries worldwide. International Data Corporation (JDC) is the world's largest provider of information technology data, analysis and consulting, with research centers in over 4 1 countries and more than 400 research analysts worldwide. IDG World Expo is a leading producer of more than 168 globally branded conferences and expositions in 35 countries including E3 (Electronic Entertainment Expo), Macworld Expo, ComNet , Windows World Expo, ICE (Internet Commerce Expo), Agenda, DEMO, and Spotlight. IDG's training subsidiary, ExecuTrain, is t he world's largest computer training company, with more than 230 locations worldwide and 785 training courses. IDG Marketing Services helps industry-leading IT companies build international brand recognition by developing global integrated marketing programs via IDG's prim. online and exposition products worldwide. Further information about the company can be found at www.idg.com. 1124/99

Reading notes: OCR-damaged characters in several words (e.g., 'WOltLDWIDE', 'wrinen', 'joumalism') Reading order of award captions and signatory names is uncertain Dollar amount '$2.05 billion' is partially visible and not clearly a product price

Printed product names
IDG Books Worldwide · Computer Currents · Macworld Expo · Computerworld · PC World · Network World · Macworld · ExecuTrain · IDG.net · ComNet · Windows World Expo · ICE (Internet Commerce Expo) · Agenda · DEMO · Spotlight · E3 (Electronic Entertainment Expo) · For Dummies
Printed dates
1997 · 1964 · 1,9-90 · 1124/99
Languages
English
PDF page 10

Dedication To my wife, Nadine. Author's Acknou1led9ments Many thanks to Carole McClendon and Steven Hayes for making this book happen; to Colleen Esterline for the suggestions, comments, and corrections that made my writing suitable to print; to Kelley Baker for her work on getting CodeWarrior Lite on the CD-ROM; and to Dennis Cohen for another helpful technical edit.

Reading notes: Heading reads 'Author's Acknou1led9ments', likely OCR damage for 'Acknowledgments' Heading preserved as printed; damaged characters may affect exact match

Printed product names
CodeWarrior Lite
Languages
English
PDF page 11

Publisher's Acknowledgments We're proud of this book; please register your comments through our IDG Books Worldwide Online Registration Form located at http: I /my2cents. dummies. com. Some of the people who helped bring this book to market include the following: Acquisitions, Editorial, and Media Development Project Editor: Colleen Esterline (Previous Edition: Mary Goodwin) Acquisitions Editor: Steven H. Hayes Technical Editor: Dennis Cohen Media Development Editor: Marita Ellixson Associate Permissions Editor: Carmen Krikorian Media Development Coordinator: Megan Roney Editorial Manager: Mary C. Corder Media Development Manager: Heather Heath Dismore Editorial Assistants: Paul Kuzmic, Beth Parlon, Alison Walthall General and Administrative Production Project Coordinators: Valery Bourke, Regina Snyder Layout and Graphics: Linda M. Boyer, J. Tyler Connor, Angela F. Hunckler, Anna Rohrer, Brent Savage, Brian Torwelle Proofreaders: Kelli Botta, Jennifer Mahern, Arielle Carole Mennelle, Nancy Price, Ethel M. Winslow, Janet M. Withers Indexer: Ty Koontz Special Help David Mehring IDG Books Worldwide, Inc.: John Kilcullen, CEO; Steven Berkowitz, President and Publisher IDG Books Technology Publishing: Brenda McLaughlin, Senior Vice President and Group Publisher Dummies Technology Press and Dummies Editorial: Diane Graves Steele, Vice President and Associate Publisher; Mary Bednarek, Director of Acquisitions and Product Development; Kristin A. Cocks, Editorial Director Dummies Trade Press: Kathleen A. Welton, Vice President and Publisher; Kevin Thornton, Acquisitions Manager IDG Books Production for Dummies Press: Michael R. Britton, Vice President of Production and Creative Services; Cindy L. Phipps, Manager of Project Coordination, Production Proof- reading, and Indexing; Kathie S. Schutte, Supervisor of Page Layout; Shelley Lea, Supervisor of Graphics and Design; Debbie J. Gates, Production Systems Specialist; Robert Springer, Supervisor of Proofreading; Debbie Stailey, Special Projects Coordinator; Tony Augsburger, Supervisor of Reprints and Bluelines Dummies Packaging and Book Design: Patty Page, Manager, Promotions Marketing • The publisher would like to give special thanks to Patrick J. McGovern, without whom this book would not have been possible. •

Reading notes: Line-break hyphenation and spacing artifacts in the source (e.g., 'my2cents. dummies. com', 'Proof-reading') may affect exact reading.

Languages
English