← Ultimate Mac Programming 1994

Ultimate Mac Programming 1994

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

Ultimate Mac Programming

FREE CD Software Includes Special Version of MetroWerks' CodeWarrior, Internet Tools, and Tons of Programming Tools to Help You Code "Apple events, the Object Model, the Sound Manager, Patching Traps - there's something in here for everyone." - Neil Ticktin, Editor-in-Chief, MacTech Magazine MacWorld ULTIMATE MAC PROGRAMMING Methods of the Macintosh Masters Dave Mark MacTech Magazine "Getting Started" Columnist Discover What the Top Mac Gurus Know Packed with Hard-Core Technical Material on the Hottest Mac Programming Topics Get up to Speed with Apple events, OSA, the Object Model, & More IDG BOOKS PROGRAMMERS PRESS

A book cover with bold blue vertical and stacked title letters, a clenched fist breaking through torn white paper, a red side panel with a free CD graphic, and a dark banner with a blurb at top.

Reading notes: The vertical spine text 'MacWorld' is partly cut off and its reading direction is rotated. The word 'CodeWarrior' is partly obscured at the left edge, so 'deWarrior' was read with the cropped prefix; the full name was inferred from the visible letters. The IDG Books and Programmers Press logos contain no additional legible copy.

Printed product names
Ultimate Mac Programming · MacWorld · CodeWarrior
Languages
English
PDF page 1

iscover What the Top Mac Guras Know

iscover What the Top Mac Guras Know Packed with Hard-Core Technical Material on the Hottest Mac Programming Topics Get up to Speed with pple events, OSA, the Object Model, & More -- PIOGUllllllS IDG BOOKS PI I JI 1 -'Apple events, the-1Jbject Model, the Sound Manager, Patching Traps - there's something in here for everyone." - Neil Ticktin, Editor-in-Chief, MacTech Magazine Methods of the Macintosh Masters MacTech Magazine "Getting Started" Columnist

Reading notes: The headline's first letter appears cut off (likely 'Discover'), and 'Guras' is probably 'Gurus' from OCR error; verify against the image. Several words are garbled or split by OCR, including 'pple' (likely 'Apple'), '1Jbject' (likely 'Object'), 'PIOGUllllllS' (unclear), and 'IDG BOOKS PI I JI' (unclear). Reading order is uncertain because the supplied text mixes headline, subheadings, quotation and credits. The quotation's attribution line and the 'Getting Started' columnist credit may not be fully legible.

Printed product names
Methods of the Macintosh Masters
Languages
English
PDF page 2

The image is a entirely blank white page with no visible artwork, layout, or text.

Reading notes: No visible text or graphics are present in the image, so the transcript and printed fields are empty.

PDF page 3

ULTIMATE MAC PROGRAMMING

A plain white page with a thick dark horizontal bar across the top and the large bold condensed black title stacked in three lines on the left, with the first letters of each word (U, M, P) set larger than the rest.

Reading notes: Title letters are stylized with the large initials U, M, and P; transcribed as printed in all capitals.

Languages
English
PDF page 4

-~-- ~- __._ - ---"---'-----· -- - DAUE lllARH II Programmers Press A Division of IDG Books Worldwide, Inc. Foster City, CA • Chicago, IL • Indianapolis, IN • Braintree, MA • Dallas, TX

Reading notes: Heading text 'DAUE lllARH' is garbled and may be an OCR error. Publisher line is fragmentary; reading order is uncertain.

Languages
English
PDF page 5

Ultimate Mac Programming

• II Um111n mac PH&1am111& Ultimate Mac Programming Published by IDG Books Worldwide, Inc. An International Data Group Company 919 E.Hillside Blvd., Suite 400 Foster City, CA 94404 Copyright © 1994 by IDG Books Worldwide. All rights reserved. No part of this book (including interior design, cover design, and illustrations) 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.: 94-072744 ISBN 1-56884-215-5 Printed in the United States of America First Printing, December, 1994 10987654321 Distributed in the United States by IDG Books Worldwide, Inc. limit of liability/Disclaim.er of Warranty The author and publisher of this book have used their best efforts in preparing this book. IDG Books Worldwide, Inc., International Data Group, Inc., and the author make no representation or warranties with respect to the accuracy or completeness of the contents of this book or the material on this disk included with this book, and specifi- cally disclaim any implied warranties of merchantability or fitness for any particular pur- pose, and shall in no event be liable for any loss of profit or any other commercial damage, including but not limited to special, incidental, consequential or other damages. Trademarks All brand names and product names used in this book are trademarks, registered trade- marks, or trade names of their respective holders. IDG Books Worldwide is not associ- ated with any product or vendor mentioned in this book. ::=::::· :::;;;; IDG BOOKS II Published in the United States

Reading notes: Possible OCR spacing irregularities in the masthead and title line ("Um111n mac PH&1am111&")

Printed product names
Ultimate Mac Programming
Printed dates
1994 · December, 1994 · 94-072744
Languages
English
PDF page 6

CREDITS Vice President and Publisher Chris Williams Publishing Director Trudy Neuhaus Brand Manager Amorette Pedersen Managing Editor Beth A. Roberts Project Editor Elizabeth Rogalin Copy Editor Jean Peck Editorial Assistant BertaHyken Assistant Brand Manager Kate Tolini Compositor Ronnie K. Bucci Proofreader Deborah Kaufmann Indexer Llz Cunningham Book Design Scally Design Cover Design Kavish + Kavish CIEllTS I.

Reading notes: OCR spacing irregular in some names, e.g. 'BertaHyken' and 'Llz Cunningham' Possible OCR error in 'CIEllTS' heading

Languages
English
PDF page 7

• UI ULTIHTE mac PRD&RHmln& Fon moR( 1nfoem111on ... For general information on IDG Books in the U.S., including information on discounts and premiums, contact IDG Books at 800-434-3422 or 415- 31 2-0650. For information on where to purchase IDG's books outside the U.S., contact Christina Turner at 415-312-0633. For information on translations, contact Marc Jeffrey Mikulich, Foreign Rights Manager, at IDG Books Worldwide; fax number: 4 15-358-1260. For sales inquires and special prices for bulk quantities, contact Tony Real at 800-434-3422 or 415-312-0644. For information on using IDG's books in the classroom and ordering examination copies, contact Jim Kelly at 800-434-2086. Ultimate Mac Programming is distributed in Canada by Macmillan of Canada, a Division of Canada Publishing Corporation; by Computer and Technical Books in Miami, Florida, for South America and the Caribbean; by Longman Singapore in Singapore, Malaysia, Thailand, and Korea; by Toppan Co. Ltd. in Japan; by Asia Computerworld in Hong Kong; by Woodslane Pty. Ltd. in Australia and New Zealand; and by Transword Publishers Ltd. in the U.K. and Europe. lnTERnaTIOnlL Ona 6aoor's PDBLICATIOns IDG Books Worldwide, Inc. is a subsidiary of lntcmaciona1 Data Group. The officers :arc P:urid: J. McGovern, founder and Board Chairman; W2her Boyd, PrtSidcnt. ARGENTINA'S Computcrwurld Argentina, lnfoworld Argentina; AUSTRALIA'S Compu1crwotld Auwalia, Au.smalian PC World, Aum'211 i:m Macworld, Network World, Mobile Ru.sincu Aus1ra li:1, Rcst'llcr, IOG Sourcc.s: AUSTRIA'S Computcrwclt Ocstt'rrcich, PC THt; BRAZIL'S Computcrworld, Gamcpro, G3mc Po wer, Mundo IBM, Mundo Unix, PC World, Super Game; BELGIUM'S Da1a News {CW); BULGARIA'S Compu1crworld Bulgaria, Ediw orld, PC & Mac World Bulgaria, Network World 8ulgari:1; CANADA'S CIO Canada, Col'l putcrworld Ca nada, G uduuc Compu1crworld, InfoCa nada, Network World D nad3; C HILE'S Compu1t:rworld Chilc, lnform:u ica; COLOMBIA'S Com puterworld Colombia, PC World; CZECH RE.PUBLIC'S Computcrworld, Elektronika, PC Wotld; DENMARK'S Communica1ions World, Computcrworld D.inmuk, Macintosh Produktkatalog, M acwurlJ Danm.:uk, PC World Danmark, PC World Produkrguidt', Tech World, Windows World; ECUADOR'S PC World Ecuador; EGYPT'S Compunrworld (CW) Middle E:ur, PC World M iddle Eau; FINLAND'S MikroPC, 1ietoviikko, Ttetoverkko: FRANCE'S Disrtiburiq~. GOLDEN MAC, ln!oPC, Languages &. Systems, Le Guidt' du Mondc lnfonnatique, Le M ondc lnformariquc, Td«OOU & Rcs.c:aux: GERMANY'S Compurcrwochc, Computerwochc Focus, Compurcrwochc Extra, Computcrwoc;he Karriere, lnform.ition M anagement, Macwth, Ncnwdr, PC Welt, PC Woc;ht, Publi,h, Unit: GREECE'S lnfoworld, PC Games: HUNGARY'S Computnworld SZT, PC World; H ONG KONG'S Compu1erworld Hong Kong, PC World Hong Kong; INOl.A'S Compu1ers l< Communic.';:ltions; IRELAND'S ComputerSropc; JSRAEI:S Coa1p1.1tcrworld Israel, PC World Israel; ITALY'S Computerworld Ir.alia, l..o1ui Maga'line, Macworld ltali.i, Netw'Orking l u1lia, PC Shopping. PC World ha lia; JAPAN'S Computerworld Today, Information Systems World, M.acworld Japan, Nikkri Personal Computing, Sun World J ap.in, Windows World; KENYA'S ~st African Computer News; KOREA'S Computcrworld Kort'a, Macworld Korea, PC World Korea; M EXICO'S Compu Edicion, Compu M.a nuf.actur-a , Computadon/Pumo de Vcnta, Computerwo rld M exico, Ml1c\Vorld, Mundo Unix, PC World, Windows; THE NETH ERLANDS' Computer! To1aa l, Computable (CW), LAN M1gnine, MacWorld, Totul .. Windows"; NEW ZEALAND'S Compu1cr LiMin31, Computcrworld New Zc:al:1nd, New U:11l:ind PC World, Network World; NIGERJA'S PC World Afric3; NORWAY'S Computcrworld Norge, C/World, lotU$world Norge, Macworld Norge, Nctworld, PC World Elupreu, PC World Norge, PC World's Produk1 guidc, Publish& Muhimcdia World, Student D;ua, Unix World, Windowsworld; IDG Direct Response; PAKISTAN'S re World Pa ki$t2n; PANA.MA'S PC World P~nanu; PERU'S Compu1crworld Pcru, PC World; PEOPLE'S REPUBLIC OF C HINA'S China Computerworld, China lnfowodd, Elcctronio Today/Multimedia World, £1caronic..s In1crnational, EJmronic Product World, China NctWork World, PC and Communications Magazine, PC World China, Softwa.rc World M.apz.inc. Tcl«om Produce World; IDG HIGH TECH BfJJING'S New ProdlKt World; IDG SHENZHEN'S Computer News Digest; PHJUPPINES' Com puterwocld Philippines, PC Digest (PCWI; POUND'S Compurcrworld Pobnd, re World/Komputcr. PORTUGAL'S CcrcbrolPC World, Correia lnformatico'Computcrworld, lnformnica &. Comunicacocs Catalogo. Macln, N.1cional de Produtos; ROMANIA'S Computerworld, PC World; RUSSIA'S Computcrwortd-Mosrow, Mfr · PC. Secy; SlNGAPORE'S Computerworld Southeast ~ PC World Sinpporc; SLOVENIA'S M onitor M agninc; SOUTH AFRICA'S Computer Mail (CIO),Computing S.A .,Network World S.A., Softwa re World; SPAIN'S Adva nced Syuems, Amiga Worl d, Computer world Espana, Communicacioncs World, Macworld Espan:i, NeXTWO RLD, Super Jucgos Magatine (GamcPro), PC World Esp;ina, Publi, h; SWEDEN'S Aruck, ComputcrSwcden, Corpora te Comput ing, Natvcrk & Kommunika tion , Macworld , Mi krod:uorn, PC World. Pu blishing & Design (CAP), Dataln,genjoren, Maxi Data,Windows World; SWrTZERLAND'S Computcrworld Schwciz, M acwortd Schwciz.. PC lip; TAIWAN'S Computcrworld Ta iwo,n, PC World Taiwan; THAILAND'S Thai Computerworld; TURKEY'S Computerwnr ld Monitor, M :acworld Turkiye, PC Wo rld Turkiyc; UKllAINE'S Compu1crworld; UNITI:':D KINGDO M'S Computing /Compu1crworld, Connexion/Network World, Lotus M:11ptinc. Macworld, Open Com p1.1t ing/Sunworld; UNITED STATES' Advanced Systems, Amiga World, Cable in rhr Cb.u room, CD Review, QO , Computcrworld. Digiral Video, DOS Resource Guide, Electronic En1rn1inment Magazine, Feder:1I Compu1cr Wetk, Federa l ln1cgra1or, GamcPro, JOG Books, Infoworld, lnfoworkj Direct, lastr Evrni, Macworld, Muhimcdia World, NctWork World, PC Lmer, PC World, Pl.tyRight, Power PC World, Pu blish, SWATPro, Video Event; VENEZUELA'S Compurerworld Vcnczueb, PC World; VIETNA?l.'i'S PC World VtCtnam.

Reading notes: OCR of the primary heading is garbled in the source ("ULTIHTE mac PRD&RHmln&"); headline taken from the clearly printed title "Ultimate Mac Programming". Several publication and country names in the IDG affiliate list are heavily garbled (e.g., "CHILE'S Computcrworld", "Compu1crworld"); spellings unverified. Reading order of the affiliate list is uncertain due to column interleaving.

Languages
English
PDF page 8

DEDICATION This book is dedicated to Deneen and Daniel. LFUEMISFOK?

A book page with a black horizontal bar across the top, a running header reading "DEDICATION" with page number "vii", a large bold "DEDICATION" title, and a single line of serif body text beneath, with faint ghosted text from the page behind visible in the middle and right.

Reading notes: The trailing string "LFUEMISFOK?" is printed directly after the sentence and is not clearly part of a word; transcribed as seen. Faint background text from the reverse side or underlying page is visible but not legible and was not transcribed.

Languages
English
PDF page 9

1111 ULTIDllTE mac PIO&llllllln& ACHROWLED6R1EDTS I'd like to thank some of the people who made this book possible, who gave up their weekends and evenings editing manuscript, debugging code, and, in general, keeping this book on track. First of all, I'd like to thank the folks whose technical know-how made this book worthwhile. Donald Olson, Greg Anderson, Jim Reekes, Jorg Brown, and Doug McKenna each breathed life into one of the book's chapters. They patiently answered questions, clarified complex concepts, and in general did their best to bring me up to speed in their particular area of expertise. Next, I'd like to thank Peter Hoddie, Greg Dow, Joe Zobkiw, Leonard Rosenthol, and Steve Michel, the brains behind Chapter 7. I'd also like to extend a special thanks to Donald Olson, Jim Reekes, Doug Moran, and Greg Marriott for all the time they spent reviewing both the code and this manuscript. Thanks also to Scott Boyd for moral and tech- nical support above and beyond the call of duty. I owe a very special thank you to the team that brought this book together: My good friend and confidante Elizabeth Rogalin, copy editor Jean Peck, Deb Kaufmann, Vicki Hochstedler, and the gang at IDG books: Chris Williams, Amy Pedersen, Trudy Neuhaus, Beth Roberts, Berta Hyken, and Ronnie Bucci. Thanks! The CD at the back of the book was the result of a tremendous effort by Kate Tolini from IDG Books and Berardino Baratta and Greg Galanos from MetroWerks. Kate coordinated all the non-MetroWerks material that appears on the CD. Berardino helped me with some much needed last minute debugging, and Greg put the whole thing together. Great job-and thanks! Finally, I'd like to thank my family and friends for their patience and support. Stu, thanks for forcing me to take all those music breaks and for introducing me to Frank. Deneen, thanks for everything else-you are the best!

Reading notes: Running header 'ULTIDllTE mac PIO&llllllln&' is garbled and uninterpretable Possible OCR errors such as 'Jorg Brown' and 'Deb Kaufmann' may be misspelled in source

Languages
English
PDF page 10

IDBLE OF Connns IH • onTEnTS WncomE 1 What's in Each Chapter 3 What's on the Disk 5 Conventions Used in This Book 6 Keep in Touch 6 APPLE EuEnTs, USA, nno THE OBJECT DlooEL 9 Overview-Learning to Read Inside Macintosh 10 Part 1 : Apple Events First-Understanding Apple Event Suites 12 Descriptors 14 The AEDesc 14 Working with the AEDesc 16 The AEDescList 18 The AERecord 20 The AppleEvent 21 Processing Apple Events 27 Detecting an Apple Eve nt 28 Installing an Apple Event Handle r 28 Writing an Ap ple Event Handler 29

Reading notes: Source text contains OCR-like spacing and possible character damage in headings such as 'IDBLE OF Connns' and 'nno THE OBJECT DlooEL'.

Languages
English
PDF page 11

•• ULTIHTE mac PIO&RlllllB Getting the Required Parameters Interfacing with the User An Apple Event Example The ReverClient Source Code The ReverServer Source Code Part 2: OSA Providing Scripting Support Adding the 'aete' Resource Testing the 'aete' Resource Part 3: The Object Model Working with Registry Objects and Properties The Containment Hierarchy A Quick Experiment Building an Object Specifier The Four Object Specifier Descriptors The Eight Form Codes Calling CreateObjSpecifierO Another Example The GetData Source Code An Object Specifier Sandbox Resolving Object Specifiers AEResolveO and Object Accessors Writing an Object Accessor Function Installing an Accessor Function Calling AEResolveO OSL Callback Functions Compare and Count Callbacks Dispose Token and Error Callbacks The "Other" Callbacks Installing OSL Callbacks One Final Example Running ReverCllentOSL and ReverServer OSL The ReverClientOSL Source Code The ReverServerOSL Source Code The ReverServerOSL 'aete' Resource Summary 29 30 32 34 47 62 63 69 70 72 73 75 76 78 83 83 84 93 93 94 95 96 96 97 97 98 98 99 99 99 102 108 116 121

Reading notes: Primary heading is garbled in the OCR text ('ULTIHTE mac PIO&RlllllB'), so no reliable headline was identified. Source is a table of contents with page numbers; reading order of section titles may be unreliable.

Languages
English