develop-12 9212 December 1992
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
develop The Apple Technical Journal TECHNIQUES FOR WRITING AND DEBUGGING COMPONENTS TIME BASES: THE HEARTBEAT OF QUICKTIME BETTER APPLE EVENT CODING THROUGH OBJECTS ANOTHER TAKE ON GLOBALS IN STANDALONE CODE COMPONENTS AND C++ CLASSES COMPARED ANIMATION AT A GLANCE TOP 10 PRINTING MISDEMEANORS KON & BAL'S PUZZLE PAGE MACINTOSH Q & A Issue 12 December 1992
A blue, stone-textured surreal architectural structure with a clock face and windows rises against a purple-to-pink gradient sky over a brown hillside, with a column of cover story titles in bold black sans-serif type on the right and the Apple logo at lower right.
Reading notes: Masthead 'develop' is set in widely letterspaced lowercase; tagline 'The Apple Technical Journal' is small, letterspaced text beneath it. Issue line shows 'Issue 12' in bold followed by 'December 1992' in regular weight.
- Printed product names
- develop
- Printed dates
- December 1992
- Languages
- English
PDF page 1
develop The Apple Technical Journal TECHNIQUES FOR WRITING AND DEBUGGING COMPONENTS TIME BASES: THE HEARTBEAT OF QUICKTIME BETTER APPLE EVENT CODING THROUGH OBJECTS ANOTHER TAKE ON GLOBALS IN STANDALONE CODE COMPONENTS AND C++ CLASSES COMPARED ANIMATION AT A GLANCE TOP 10 PRINTING MISDEMEANORS KON & BAL'S PUZZLE PAGE MACINTOSH Q & A Issue 12 December 1992
A blue-toned, textured 3D illustration of an abstract stone-like building with a clock face and windows sits on a brown hill against a purple-to-pink gradient sky, beside a column of article titles on a white background, with the Apple logo at lower right.
Reading notes: Masthead 'develop' is a stylized wordmark; 'The Apple Technical Journal' is small, widely letterspaced text. Article list is in a right-hand column read top to bottom; the headline is taken as the masthead wordmark 'develop'.
- Printed product names
- develop
- Printed dates
- December 1992
- Languages
- English
PDF page 2
E D I T O R I A L S T A F F Editor-in-Cheek Caroline Rose Technical Buckstopper Dave Johnson Our Boss Greg Joswiak His Boss David Krathwohl Review Board Pete (“Luke”) Alexander, Neil Day, C. K. Haun, Jim Reekes, Bryan K. (“Beaker”) Ressler, Larry Rosenstein, Andy Shebanow, Gregg Williams Managing Editor Monica Meffert Assistant Managing Editor Ana Wilczynski Contributing Editors Lorraine Anderson, Geta Carlson, Toni Haskell, Judy Helfand, Rebecca Pepper, Rilla Reynolds Indexer Ira Kleinberg A R T & P R O D U C T I O N Production Manager Hartley Lesser Art Director Diane Wilcox Technical Illustration Nurit Arbel, John Ryan Formatting Forbes Mill Press Printing Wolfer Printing Company, Inc. Film Preparation Aptos Post, Inc. Production PrePress Assembly Photography Sharon Beals, Lisa Jongewaard Online Production Cassi Carpenter develop, The Apple Technical Journal, is a quarterly publication of the Developer Support Information group. The stone jigsaw puzzle was pieced together by Hal Rucker of Rucker Huggins using Adobe Illustrator, FontMonger, Ray Dream Designer 2.0, and Adobe Photoshop. The Developer CD Series disc for November/December 1992 or later contains this issue and all back issues of develop along with the code that the articles describe. The develop issues and code are also available on AppleLink and via anonymous ftp on ftp.apple.com.
Reading notes: No clear advertising headline; the only top-level label is the spaced-out section title EDITORIAL STAFF, so headline is set to null. Fields were filled from the supplied extracted copy, not verified against the image layout, so visual description and reading order are unconfirmed. The name develop, The Apple Technical Journal is split across a comma in the source copy, and the masthead wording is taken as printed. Software tools named in the colophon (Adobe Illustrator, FontMonger, Ray Dream Designer 2.0, Adobe Photoshop, AppleLink) are mentions of tools rather than advertised products, so they were not listed in productNames.
- Printed product names
- develop · Developer CD Series
- Printed dates
- November/December 1992
- Languages
- English
PDF page 3
CONTENTS December 1992 1 © 1992 Apple Computer, Inc. All rights reserved. Apple, the Apple logo, APDA, AppleLink, AppleTalk, ImageWriter, LaserWriter, MacApp, Macintosh, MacTCP, MPW, MultiFinder, SADE, and StyleWriter are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. develop, Finder, Macintosh Quadra, MacroMaker, PowerBook, QuickDraw, QuickTime, Sound Manager, and System 7 are trademarks of Apple Computer, Inc. PostScript and Adobe are trademarks of Adobe Systems Incorporated, which may be registered in certain jurisdictions. HyperCard is a registered trademark of Claris Corporation. NuBus is a trademark of Texas Instruments. UNIX is a registered trademark of UNIX System Laboratories, Inc. All other trademarks are the property of their respective owners. Playing the postdating game. 2 CDs lost in space. 4 Techniques for Writing and Debugging Components by Gary Woodcock and Casey King Components aren’t just for QuickTime programmers anymore. 7 Time Bases: The Heartbeat of QuickTime by Guillermo A. Ortiz Understanding and manipulating time bases directly is sometimes helpful. Here are some tips. 41 Better Apple Event Coding Through Objects by Eric M. Berdahl Adding Object Model support to your existing OOP code may be easier than you think. 58 Another Take on Globals in Standalone Code by Keith Rollin For MPW users, here’s an alternative way to implement globals in standalone code. 89 Be Our Guest: Components and C++ Classes Compared by David Van Brink Components and C++ classes have some surface similarities but underneath are very different beasts. 37 Graphical Truffles: Animation at a Glance by Edgar Lee Three basic animation techniques everyone should know about. 53 Print Hints: Top 10 Printing Misdemeanors by Pete (“Luke”) Alexander You know the felonies, now learn the lesser printing crimes. 84 The Veteran Neophyte: Digital Zoology by Dave Johnson Genetic takeovers, Lamarckian evolution, and language. 116 KON & BAL’s Puzzle Page: A Micro Bug by Konstantin Othmer and Bruce Leak Remember that little built-in debugger that no one ever uses? People do. 134 Macintosh Q & A Apple’s Developer Support Center answers your product development questions. 120 138 I N D E X Q & A C O L U M N S A R T I C L E S L E T T E R S E D I T O R I A L
Reading notes: Product names drawn from a trademark notice rather than advertising copy.
- Printed product names
- Apple · AppleLink · AppleTalk · ImageWriter · LaserWriter · MacApp · Macintosh · MacTCP · MPW · MultiFinder · SADE · StyleWriter · develop · Finder · Macintosh Quadra · MacroMaker · PowerBook · QuickDraw · QuickTime · Sound Manager · System 7 · PostScript · Adobe · HyperCard · NuBus · UNIX
- Printed dates
- December 1992 · 1992
- Languages
- English
PDF page 4
Dear Readers, The more observant among you may have noticed that we’ve made yet another change to develop with respect to how it’s dated. The last change happened with Issue 10, when we stopped designating issues with the current season and went back to using the current month, because the season isn’t the same around the world. Now we’ve moved the date ahead by one month — also to accommodate worldwide distribution. For the terminally curious, here are the details: Apple Direct , our vanguard of information for business and technical decison makers, doesn’t reach other countries until two to eight weeks after it’s distributed in the U.S.; it might, for example, be folded into a local mailing whose schedule doesn’t coincide. So by the time some non-U.S. developers see Apple Direct , they think they’ve been sent a past issue rather than the latest one. To help convey to them that it is indeed the latest issue, it’s now dated with a month that’s closer to when they’ll see it. The Developer CD Series disc, Apple Direct , and develop all need to be in sync — so there you have it. What is now the December issue of develop was the Autumn issue last year and the October issue in 1990 (when our production cycle was a month out of phase from where it is now). Anyway, we hope those of you in the U.S. agree there’s no harm in a little time travel forward. A little time travel forward would be really handy for me while I’m writing these editorials, because I don’t always know what the state of the develop -related world will be two months in advance (that’s the lag time before you actually read this). In Issue 11’s editorial, for example, I couldn’t alert you to develop ’s being in a new format on the Developer CD Series disc, because at that time we weren’t sure it would make it onto that disc. Yes, we’ve responded to your complaints about develop in HyperCard® by switching to that popular viewing tool that you may know as “BlueNote” — now “Apple DocViewer” — the same tool that’s used for viewing New Inside Macintosh . The Developer CD corresponding to Issue 11 contained a prerelease version of DocViewer that still needed some work; for example, it wouldn’t work at all on a Macintosh Plus. In lieu of a time machine, I’ve consulted the Magic 8-Ball DTS uses to answer developer questions, and it tells me that the CD corresponding to this issue of develop — called the “November/December” CD, to ease the transition — will include a version 1.0 release of DocViewer along with Issues 11 and 12 in DocViewer d e v e l o p December 1992 CAROLINE ROSE (AppleLink CROSE) has been writing software documentation since before there were personal computers or even lava lamps. Her total of five years at Apple is (to use the jargon she helped coin in Inside Macintosh Volume I) a discontinuous selection, interrupted by as many years at NeXT. When not reading, writing, coining, or otherwise obsessing over words, Caroline enjoys the outdoors. (As songwriter Greg Brown puts it, “People say small things when they stay too long in little rooms.”) The highlight of her summer was “swimming Lava Falls”: being thrown from a raft that capsized in the largest rapid (a 37-foot drop) on the Colorado River in the Grand Canyon, and being rescued by a small paddleboat that braved the next rapid with 12 worried souls aboard. Talk about an adrenaline rush! And she lived to tell the tale.• 2 CAROLINE ROSE
Reading notes: Possible typo 'decison' in source text Reading order of the byline and contributor note at the end is unclear
- Printed product names
- Apple Direct · Developer CD Series · develop · BlueNote · Apple DocViewer · New Inside Macintosh · HyperCard · Macintosh Plus · Inside Macintosh Volume I · NeXT
- Printed dates
- December 1992 · 1990 · 1992
- Languages
- English
PDF page 5
format. Version 1.0 should work on Macintosh Plus and newer models, with system software version 6.0 and later. Back issues of develop will eventually also make their way over into this format (the 8-Ball is hazy regarding just when this will happen). We’d really like your feedback on DocViewer and how well it works for reading develop (or anything else). Please check it out, and send your flames or even praise to AppleLink DEV.CD. Whoops — did I say “DTS”? Old habits die hard. Another change we’re gradually making in develop is to shift from “Developer Technical Support” (DTS) to “Developer Support Center” (DSC). As you may have read in the April 1992 issue of Apple Direct , the DSC is a gateway to DTS as well as other support-related resources. It provides a focal point for developer queries — a single AppleLink address, DEVSUPPORT, and a single phone number, (408)974-4897. Developers who aren’t Apple Associates or Partners can contact the DSC for limited nontechnical support and referrals. We’ll be adjusting to this change along with others that are creeping in: Tech Note references no longer numbered; Inside Macintosh references that include New Inside Macintosh ; DocViewer as the on-line viewing tool; postdating; and other changes that I foresee but don’t dare reveal lest I upset the delicate balance of the universe. Finally, I feel compelled to explain my bizarre trivia answer in Issue 11, about the upside-down character that wasn’t. I claimed the offending character was “8,” which on the contrary looks perfectly OK — not at all topheavy — in printed develop . It turns out that this “8” is topheavy only in LaserWriter output. That will teach me to use a media-specific question! I think I’ll quit while I’m behind and lay off trivia questions altogether for a while (even though I’ll miss those friendly letters from you). Caroline Rose Editor EDITORIAL December 1992 3 SUBSCRIPTION INFORMATION To subscribe to develop, use the subscription card in the back of this issue. Please address all subscription-related inquiries to develop, Apple Computer, Inc., P.O. Box 531, Mt. Morris, IL 61054 (or AppleLink DEV.SUBS).• BACK ISSUES For information about back issues of develop and how to obtain them, see the last page of this issue. Back issues are also on the Developer CD Series disc.•
Reading notes: Some words in the text are split across line breaks, so the reading order of the editorial and subscription sections may be unclear.
- Printed product names
- Apple Direct · DocViewer · Inside Macintosh · Developer CD Series
- Printed dates
- April 1992 · December 1992
- Languages
- English
PDF page 6
POSTAL DEVILS EATING CDS? develop is the most exciting piece of regular mail I get after Japanese animation laserdiscs. I joyfully received Issue 11 but unfortunately the wolverines in the Postal Service dined on some of the plastic and no CD was to be found! Help! — Jim Perry Would you consider mailing develop in a nonperforated plastic wrapping? The perforation was two-thirds torn when I received it. — Eva Schlesinger I really enjoy develop , but I have to say that I’ve enjoyed it less recently. Some time ago the CDs came in a small envelope well protected inside the magazine, and everything was fine. Now, develop is shipped with the CD in its own holder, which would seem to be a fabulous idea except that you were blind-sided by the U.S. Post Office. Every month since the CD got its own holder, the Post Office has mangled my plastic bag, CD holder, and magazine. Today my develop issue 11 arrived sans CD. I called the subscription office (1-800-545-9364) and they promise to send me another within four weeks.(!?) Growl. — Bob Cent Most of the mail I get is, unfortunately, on this subject. Our Production Manager, Hartley Lesser, really has been working on it. Even with Issue 11, we took a small step toward solving the problem: since many people thought someone was breaking open the package and stealing the CD, we inserted a thick sheet of paper over the CD so that it wouldn’t be visible. But complaints of torn packaging still came in, so clearly the packaging just wasn’t sturdy enough. The packaging around Issue 12 and its CD should be about twice as thick as before and have no perforation. If that doesn’t work we’ll try something else. Issue 7 was the last one to list the 800 number you used to contact the subscription office (though it stubbornly has still shown up on our renewal notice). The correct number is 1-800-877-5548. The person you spoke to normally doesn’t handle calls regarding develop and didn’t know that replacement CDs should be mailed within a day or two of notification of the problem. Sorry for the mixup. We hope you’ll never need that service again! — Caroline Rose SCREENWRITING CAVEAT Your Issue 11 column on drawing to the screen was really useful to me. I had an animation program that wrote directly to the screen and it worked fine. But when I upgraded to a new accelerator card my program kept crashing. I spent months trying to figure out the problem. But your article fixed it straight away. All I needed was the SwapMMUMode calls. I don’t know why the previous card didn’t require them, but my program works fine now. — Tony Cooper Thanks for your interest in the column. We’re glad it was helpful to you. One thing we want to be sure to mention is that writing directly to the screen will break for sure on future Macintosh systems based on RISC technology. And we again want to d e v e l o p December 1992 WHY DON’T YOU WRITE MORE OFTEN? We welcome timely letters to the editors, especially from readers reacting to articles that we publish in develop. Letters should be addressed to Caroline Rose (or, if technical develop-related questions, to Dave Johnson) at Apple Computer, Inc., 20525 Mariani Avenue, M/S 75-2B, Cupertino, CA 95014 (AppleLink CROSE or JOHNSON.DK). All letters should include your name and company name as well as your address and phone number. Letters may be excerpted or edited for clarity (or to make them say what we wish they did). • 4 LETTERS
Reading notes: Possible damaged or merged text at 'develop' repeated mentions Reading order of the column ending and the 'WHY DON'T YOU WRITE MORE OFTEN?' box may be uncertain
- Printed product names
- develop · Macintosh
- Printed dates
- December 1992 · Issue 11 · Issue 12 · Issue 7
- Languages
- English
PDF page 7
stress that the only applications that should even consider writing directly to the screen are games and other animation programs. — Brigham Stevens and Bill Guschwan USER-FRIENDLY RENEWING Recently I received a couple of renewal notices for develop in the mail. In trying to decipher these notices, I realized that user friendliness is something we should all be aiming for not just in the software we write, but in everything we do. It’s interesting how working with the Macintosh makes one aware of human interface issues in everyday life. Anyway, I think there are a few ways in which the develop renewal notices could be made more user friendly: 1. Leave a bigger space for writing the credit card number. 2. Clearly indicate on the renewal notice the date my subscription expires. 3. Is there any reason why the renewal notices are printed in red ink? —Tim Hammett We’re in the process of making the changes you suggested to the develop renewal notice. 1. We’ll leave a bigger space for writing the credit card number. 2. The notice will indicate when the subscription expires. You can also find this out at any time from your mailing label: the number that appears on a line by itself at the top of the label indicates the last issue you’ll receive unless you renew. 3. The reason for the red ink is so that this little piece of paper doesn’t get lost on your desk. But you’ve inspired us to change it to a more readable, deeper red. We’re also correcting the 800 phone number on the notice, to 1-800-877-5548. Thanks for your letter. Without it, I would have assumed that the renewal notice (which isn’t really in my domain) was in great shape. I appreciate the enlightenment. —Caroline Rose REUSED CDS: IS IT ART? In Issue 10 of develop , Bruce Radford stated that he wasn’t sure what to do with his old CDs. He felt that he should recycle them, but he wasn’t sure how. Well, I have a suggestion. Many people forget that reusing something is often even better than straight recycling. My school would have many uses for old issues of the develop CD. I know a few friends who would love copies, no matter how old; I could use them in a programming class; and other students could cut them up to make jewelry for school fundraisers. I also have many uses for old 256K SIMMs, which seem to be becoming about as useful as pennies now. So go ahead and send the stuff that you think no one needs to me, or to a school near you. — Peter Bierman (age 16) BS Software 5757 Olentangy Blvd. Worthington, OH 43085 Thanks for the idea. Day care centers and children’s museums have also been mentioned as possible destinations for old CDs. We suggest that before giving away CDs for for art projects, developers put a deep scratch through the data side of the CD if it contains any confidential or licensed data. LETTERS December 1992 5
Reading notes: Line breaks in OCR text make some sentence boundaries uncertain Page header '5' and 'LETTERS December 1992' placement near the end is ambiguous
- Printed product names
- develop · Macintosh · SIMMs
- Printed dates
- December 1992 · Issue 10
- Languages
- English
PDF page 8
For some wild and crazy ideas on this from Apple’s Developer Support Center, see the Q & A on page 126. — Caroline Rose DEVELOP INTERNET ADDRESS I’m on the Internet and develop contains only AppleLink addresses. I’m guessing that crose@applelink.apple.com is your Internet address. develop really should have an Internet address for academic developers to send e-mail to. — Eric Kofoid Adding “applelink.apple.com” to any AppleLink address converts it to an Internet address. The Internet addresses for me and develop ’s Technical Editor Dave Johnson are listed on the last page of every issue. — Caroline Rose BACK ISSUES CONUNDRUM I noticed that your back issues are listed at $13 in develop and at $10 in the APDA catalog. Why the discrepancy? Who should I order the back issues from? — Michael Tackie P.S. Great magazine. Very technical. I don’t understand everything, but that’s good; it forces me to become a better programmer. You pay a $3 shipping charge when you order from APDA, so it adds up to $13 in the end. — Caroline Rose P.S. Thanks! d e v e l o p December 1992 6 The “Apple Event Objects and You” article in develop Issue 10 contains two errors in the printed sample code. The first problem is that five lines were omitted from the end of GetWindowIndex. The code at the top of page 25 should be changed from return noErr; } to if ((rawIndex > numWindows)||(rawIndex <= 0)) { *index = 0; return errAENoSuchObject; } else *index = rawIndex; return noErr } The second bug is in the routine WriteRectToken (page 30). The following call BlockMove(*thisRectDesc.dataHandle, &tokenPtr->theRect,sizeof(Rect)); should be changed to BlockMove(*thisRectDesc.dataHandle, (Ptr)tokenPtr->theRect,sizeof(Rect)); Since theRect is actually a pointer to a rectangle (see the declaration at the top of page 29), the first version would have destroyed the pointer and four bytes of the following long integer. Thanks to Doug McKenna, the author of Resorcerer, for pointing out these problems. CORRECTION TO APPLE EVENTS ARTICLE IN ISSUE 10
Reading notes: Headline not clearly identifiable from the supplied copy; set to null. Reading order of a column-split page ('P.S.' lines) may be uncertain.
- Printed product names
- develop · APDA · AppleLink · Resorcerer
- Printed prices
- $13 · $10 · $3
- Printed dates
- December 1992
- Languages
- English
PDF page 9
Programmers first saw the Component Manager as part of the QuickTime 1.0 system extension. Now that the Component Manager is part of System 7.1, components aren’t just for QuickTime programmers any more. This article shows you how to take advantage of the power and flexibility of components as a way to give extended functionality to any Macintosh application. Software developers are continually searching for ways to avoid reinventing the proverbial wheel every time they need new capabilities for their programs. A new approach is available with components. Components are modules of functionality that applications can share at run time. They enable applications to extend the services of the core Macintosh system software with minimal risk of introducing incompatibilities (unlike, for example, trap patching). As Figure 1 suggests, components also encourage a building-block approach to solving complex problems. Higher-level components can call lower-level components to build sophisticated functionality, while at the same time making the application program interface (API) much simpler. What’s more, because components are separate from an application that uses them, you can modify and extend components without affecting the application. Components are maintained by the Component Manager, which is responsible for keeping track of the components available at any given time and of the particular services they provide. The Component Manager provides a standard interface through which applications establish connections to the components they need. Almost anything you can dream up can be a component — video digitizer drivers, dialogs, graphics primitives, statistical functions, and more. QuickTime 1.0 itself contains a number of useful components, including the movie controller, the sequence grabber, and a variety of image compressors and decompressors ( codecs ), all of which are available to any client application. TECHNIQUES FOR WRITING AND DEBUGGING COMPONENTS December 1992 7 GARY WOODCOCK AND CASEY KING have a long history of collaboration. They first met at a flight simulation company in the early 80’s where they worked together on designing a multimillion-dollar F-16 jet fighter simulator (and you thought Falcon was cool!). They parted ways temporarily, but regrouped at Apple to join forces in what colleague Jim Batson has termed the “QuickTime sleep deprivation experiment.” They’re both currently working on RISCy products, but from different parts of the country (Gary in Cupertino, and Casey in the new PowerPC mecca of Austin, Texas). With his wife Lonna, Casey is the proud co-owner of his latest obsession — a year-old baby boy named Brian — but he still makes time for mountain biking, hiking, and flying. Gary still spends much of his time diligently testing video capture cards for GARY WOODCOCK AND CASEY KING TECHNIQUES FOR WRITING AND DEBUGGING COMPONENTS
Reading notes: Byline and headline fragments appear out of reading order in the source text.
- Printed product names
- QuickTime 1.0 · System 7.1 · Falcon · F-16 · PowerPC
- Printed dates
- December 1992 · early 80's
- Languages
- English
PDF page 10
To demonstrate the all-around usefulness of components, we’ll examine the development and implementation of a component that does some rather trivial mathematical calculations. This example will help us focus on concepts rather than getting lost in the details of solving a complex problem. We’ll build a fairly generic component template that you can use in your own designs. We’ll also discuss some advanced component features, such as extending component functionality, capturing components, and delegating component functions. Finally, we’ll show you some techniques and tools for debugging your components. The accompanying Developer CD Series disc contains our example component’s source code, a simple application to test our component, and the debugging tools. d e v e l o p December 1992 QuickTime compatibility with Movie Recorder (translation: watching Star Trek: The Next Generation episodes on his Macintosh). Occasionally he ventures out for a bit of mountain biking or flying. This article is their latest joint venture. • 8 Sequence grabber component (type 'barg') Movie recording application Sound digitizing hardware Sequence grabber video channel component (type 'sgch', subtype 'vide') Sequence grabber sound channel component (type 'sgch', subtype 'soun') Video digitizer component (type 'vdig') Image compressor component (type 'imco') Sound driver Video digitizing hardware Figure 1 Using Components as Software Building Blocks
Reading notes: Reading order of the page is interleaved with sidebar and figure text Figure label text may be partially out of sequence
- Printed dates
- December 1992
- Languages
- English
PDF page 11
Note that this article doesn’t spend a great deal of time explaining how applications can find and use components. We assume that you’ve invested some effort in reading the QuickTime Developer’s Guide (part of the QuickTime Developer’s Kit). If you haven’t, we strongly urge you to do so, since the Developer’s Guide contains the definitive description of the Component Manager. SHOULD YOU WRITE A COMPONENT? OK, components sound interesting, but should you write one? Why write a component when you can just code the functionality you need directly into your application or write a device driver? Here are a few reasons to choose components over the alternatives: • Components are easier for applications to use. Client applications don’t have to know what they’re looking for before opening a service. This is different from device drivers, where open calls must provide either a driver name or a refNum. An application can simply tell the Component Manager, “I’m looking for somebody to do this for me. Is anybody available?” In addition, clients don’t need to set up parameter blocks or make control/status calls to use components. Armed with the API of the component type, the caller simply makes normal function calls to the component, and the Component Manager does the work. • Components are more flexible. You can modify the behavior of a component by overriding its capabilities without adversely affecting the application. The Component Manager enables the component to communicate its capabilities to clients dynamically. • Components allow you to design more flexible applications. They can be used to divide the functional aspects of an application into parts. For example, a word processing application might use a spelling checker component, a thesaurus component, and a grammar checker component. If the thesaurus component is TECHNIQUES FOR WRITING AND DEBUGGING COMPONENTS December 1992 9 The original name for the Component Manager (as conceived of by Bruce “Of course the feature set is frozen!” Leak) was the Thing Manager. Components were referred to as “things” (as were the QuickTime project schedules, the significance of which engineers couldn’t easily grasp). The use of this terminology led to one of two conditions in most QuickTime engineers: in some, an irrepressible compulsion to make “thing” puns, and in others, perhaps as a backlash against the former, an almost pathological aversion to the use of the word “thing” in normal conversation. COMPONENT TRIVIA #1
Reading notes: Running page header and page number '9' are mixed into the body text, so reading order around them may be uncertain. The footnote-style parenthetical about Bruce Leak is set in a separate block whose placement relative to the body is unclear.
- Printed product names
- QuickTime Developer’s Guide · QuickTime Developer’s Kit · Component Manager · Thing Manager
- Printed dates
- December 1992
- Languages
- English