← develop-26 9606 June 1996

develop-26 9606 June 1996

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

Dynamic Display Dilemmas • Attaching and Embedding Scripts • Scripted Text Editing develop The Apple Technical Journal Issue 26 June 1996 Planning for Mac OS 8 Compatibility Connecting Users With QuickTime Conferencing OpenDoc Parts and SOM Dynamic Inheritance Adding Custom Data to QuickDraw 3D Objects 64-Bit Integer Math on 680x0 Machines $10.00

A blue-toned magazine cover with a handwritten-style masthead, an Apple logo, a stylized circuit-diagram and steam-locomotive line drawing background, a chip labeled 3215d, and a highlighted gold-rimmed wheel at bottom right.

Reading notes: Small chip and circuit labels such as 3215d, 6201e and Alt 301 are faint and were not included in the transcript. The masthead script word 'develop' is stylized and read from the handwritten logo. Reading order of the left-column cover lines is top to bottom as printed.

Printed product names
develop
Printed prices
$10.00
Printed dates
June 1996 · Issue 26
Languages
English
PDF page 1

Planning for Mac OS 8 Compatibility Connecting Users With QuickTime Conferencing OpenDoc Parts and SOM Dynamic Inheritance Adding Custom Data to QuickDraw 3D Objects 64-Bit Integer Math on 680x0 Machines $10.00 Dynamic Display Dilemmas • Attaching and Embedding Scripts • Scripted Text Editing T h e A p p l e T e c h n i c a l J o u r n a l Issue 26 June 1996

Reading notes: Transcript intentionally left empty per instructions; the exact text is preserved separately. Headline is taken from the spaced-letter masthead and may not match the printed styling exactly. Article titles are listed as cover copy and are not treated as advertised products. Reading order and cover layout were not verified against the image; the supplied copy was used as the source.

Printed prices
$10.00
Printed dates
June 1996
Languages
English
PDF page 2

E D I T O R I A L S T A F F Editor-in-Cheek Caroline Rose Managing Editor Toni Moccia Technical Buckstopper Dave Johnson Bookmark CD Leader Alex Dosher Able Assistant Meredith Best Our Boss Mark Bloomquist His Boss Dennis Matthews Review Board Brian Bechtel, Dave Radcliffe, Quinn “The Eskimo!”, Jim Reekes, Bryan K. “Beaker” Ressler, Larry Rosenstein, Nick Thompson, Gregg Williams Contributing Editors Lorraine Anderson, Linda Fogel, Toni Haskell, Judy Helfand, Cheryl Potter Indexer Marc Savage A R T & P R O D U C T I O N Art Direction Lisa Ferdinandsen Technical Illustration John Ryan Formatting Forbes Mill Press Production Diane Wilcox Photography Sharon Beals, Josephine Tsen, Socorro Anaya Cover Illustration Graham Metcalfe of Metcalfe/Shuhert Design ISSN #1047-0735. © 1996 Apple Computer, Inc. All rights reserved. Apple, the Apple logo, AppleLink, AppleScript, AppleTalk, ColorSync, LaserWriter, Lisa, MacApp, Macintosh, MacTCP, MovieTalk, MPW, Newton, OpenDoc, PowerBook, Power Macintosh, PowerShare, PowerTalk, QuickTime, SANE, and TrueType are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. AOCE, A/ROSE, develop, Dylan, Finder, Mac, NewtonScript, and QuickDraw are trademarks of Apple Computer, Inc. Adobe and PostScript are trademarks of Adobe Systems Incorporated or its subsidiaries and may be registered in certain jurisdictions. PowerPC is a trademark of International Business Machines Corporation, used under license therefrom. SOMobjects is a licensed trademark of International Business Machines Corporation. Netscape Navigator is a trademark of Netscape Communications Corporation. UNIX is a registered trademark of Novell, Inc. in the United States and other countries, licensed exclusively through X/Open Company, Ltd. All other trademarks are the property of their respective owners. T H I N G S T O K N O W develop, The Apple Technical Journal, a quarterly publication of Apple Computer’s Developer Press group, is published in March, June, September, and December. It provides developers of Apple- platform products with technical articles and code that have been reviewed for robustness by Apple engineers. This issue’s CD. Subscription issues of develop are accompanied by the develop Bookmark CD. This CD contains a subset of the materials on the Developer CD Series , which is part of the Apple Developer Mailing available through the Apple Developer Catalog . Included on the CD are this issue and all back issues of develop along with the code that the articles describe. (The code is updated periodically, so always use the most recent CD.) The CD also contains Technotes, sample code, and other documentation and tools (these contents are subject to change). Items referred to as being on “this issue’s CD” are located on either the Bookmark CD or the Reference Library or Tool Chest edition of the Developer CD Series . Much of the CD contents, including the develop issues and code, is also available at ftp://ftpdev.info.apple.com and in the Developer Services area on AppleLink. See also the Web site for Apple Developer Services and Products, at http://dev.info.apple.com. Macintosh Technical Notes. A designation like “(CS 06)” after a reference to a Macintosh Technical Note or Macintosh Technical Q&A indicates its category and number on this issue’s CD or on the Internet. (CS is the ColorSync category.) The new (uncategorized) Technotes are designated by number alone. C O N T A C T I N G U S Feedback. Send editorial comments or suggestions to Caroline Rose at crose@apple.com or AppleLink CROSE. Technical questions about develop should be directed to Dave Johnson at dkj@apple.com, AppleLink JOHNSON.DK, or CompuServe 75300,715. You can send a fax to Caroline or Dave at (408)974-9423 or write to them at Apple Computer, Inc., 1 Infinite Loop, Cupertino, CA 95014. Article submissions. Ask for our Author’s Guidelines and a submission form at develop@apple.com or AppleLink DEVELOP. Subscriptions and back issues. You can subscribe to develop through the Apple Developer Catalog (see ordering information below) or use the subscription card in this issue. You can also order printed back issues through the catalog. The one-year U.S. subscription price is $30 (for four issues and four develop Bookmark CDs), or U.S. $50 in other countries. Back issues are $13 each. These prices include shipping and handling. For Canadian orders, the subscription price includes GST (R100236199). Apple Developer Catalog. To order develop or other products through the catalog, or to make subscription- related queries, call 1-800-282-2732 in the U.S., 1-800-637-0029 in Canada, (716)871-6555 internationally, or (716)871-6511 for fax. You can send e-mail to order.adc@applelink.apple.com or AppleLink ORDER.ADC, or write Apple Developer Catalog , Apple Computer, Inc., P.O. Box 319, Buffalo, NY 14207- 0319. For all subscription changes or queries, please be sure to include your name, address, and account number as it appears on your mailing label. Printed on recycled paper by Stream International, USA

Reading notes: No readable headline; the letterspaced section headings are not treated as a headline. Transcript is intentionally empty because exact text is preserved separately; the other fields were filled only from the supplied copy. Multi-column reading order and the layout of the staff listing cannot be confirmed from the supplied copy alone. The price "$50" is printed twice in different forms ("$50" and "U.S. $50"), and the "$30" and "$13" entries refer to subscription and back-issue prices. The "develop Bookmark CD" name and "Developer CD Series" are mentioned in running text rather than as separate product advertisements.

Printed product names
develop · develop Bookmark CD · Developer CD Series
Printed prices
$30 · U.S. $50 · $13
Printed dates
1996
Languages
English
PDF page 3

A R T I C L E S 5 Planning for Mac OS 8 Compatibility by Steve Falkenburg Mac OS 8 brings changes that may affect your code. This article discusses the compatibility ramifications of Mac OS 8 and gives some sound advice for how to get your code ready now. 33 Connecting Users With QuickTime Conferencing by Dean Blackketter QuickTime Conferencing allows users to share time-based data such as video and sound. Here are the basics. 60 OpenDoc Parts and SOM Dynamic Inheritance by Éric Simenel Although you don’t need to know much about SOM to write OpenDoc parts, with a little knowledge about this underlying technology you can do some very useful things. 80 Adding Custom Data to QuickDraw 3D Objects by Nick Thompson, Pablo Fernicola, and Kent Davidson By defining your own attribute and element types, you can attach custom data to QuickDraw 3D objects. This flexibility opens up a world of new possibilities, a few of which are explored in this article. 101 64-Bit Integer Math on 680x0 Machines by Dale Semchishen There’s a 64-bit library built into the Toolbox on the Power Macintosh, and there’s also one built into QuickDraw GX. Finally, here’s a library that will work on any Macintosh, using built-in routines if available. C O L U M N S 27 GRAPHICAL TRUFFLES Dynamic Display Dilemmas by Kent Miller and Cameron Esfahani How your application can live copacetically with the Display Manager. 57 MPW TIPS AND TRICKS Scripted Text Editing by Tim Maroney An overview of MPW’s powerful, scriptable text editing capabilities. 76 ACCORDING TO SCRIPT Attaching and Embedding Scripts by Cal Simone Integrating scripts in your application can have a big payoff for your users. 99 PRINT HINTS The Top 10 Printing Crimes Revisited by Dave Polaschek Despite our best efforts, developers continue to commit printing crimes. We’re not giving up. 110 BALANCE OF POWER Sleuthing Through Your Code by Dave Evans Debugging is a lot like being a detective. 115 MACINTOSH Q & A Apple’s Developer Support Center answers questions about Macintosh product development. 123 THE VETERAN NEOPHYTE Manual Labor by Jim Mensch Lots of activities have hidden lessons that can be applied to programming — for example, rebuilding a car engine. 125 NEWTON Q & A: ASK THE LLAMA Answers to Newton-related development questions. Send in your own questions for a chance at a T-shirt. 130 KON & BAL’S PUZZLE PAGE New World Order by Cameron Esfahani and Alex Rosenberg Playing Marathon during work hours is not only justifiable but can actually prove fruitful. 2 EDITOR’S NOTE 3 LETTERS 138 INDEX Issue 26 June 1996 CONTENTS 1

Printed dates
June 1996
Languages
English
PDF page 4

A couple of issues ago, I told a story here about how my friend John had failed to find some song lyrics on the Web before I managed to locate them by old-fashioned, real-world means. A few of you wrote to say how easily you found those same lyrics on the Web. Maybe they were posted after the incident I related, or maybe John just didn’t look in the right place, but my point was a general one: the Web is not the world. At first I thought that editorial would be controversial, but before it was published I noticed similar remarks starting to appear elsewhere, along the lines of the Internet and the Web being overrated. Since then I’ve seen even more critical articles on the subject — the inevitable backlash, I suppose. Now that such kvetching has become socially acceptable, I should probably turn to another subject, but alas... My main complaint is with the quality of a lot of what’s posted online. I don’t mind so much if someone’s personal home page is a bit rough, but large corporations that should do better seem not to be doing even minimal copyediting and fact checking on what they post to the Web. It’s gotten to the point where, to some people, being published on the Internet is becoming synonymous with being low quality. I even came across this sentiment in a review of a book (not related to computers) in the New York Times : after criticizing the book for sloppy editing, the reviewer wrote, “If this is the way books are going to be published, we may as well just shove the typing onto the Internet and forget about bound volumes altogether.” Why is it that the highest-quality online publications are those that are also published in print? It’s as if “committing” something to print makes it seem more respectable, more enduring. As a provider of not only develop content but also a newsletter of my own on the Web, I find this ironic. Ever since my publications have been made so easily available online, reader feedback indicates that many more people have been referring to back issues; they treat all the content — past and present — as a single, timeless body of information. This timelessness argues for the same attention to quality online as in the print medium, or at least for more efforts in that direction. I think one problem may be the confusion about where to put Web publishing in an organization. Most Web-related job descriptions I’ve seen ask for a content provider, formatter/designer, and HTML expert all rolled into one. That’s like having authors of develop articles design the page layout and produce the printed product. Ask one person to do it all and what do you expect? You may not care about minor errors, but inattention to quality will extend, web-like, beyond punctuation and grammar into the more critical realms of coherency and accuracy. So please, take a second look at your Web pages and other online content with this in mind. The world will thank you. CAROLINE ROSE develop Issue 26 June 1996 2 EDITOR’S NOTE CAROLINE ROSE (crose@apple.com, AppleLink CROSE) finds her most difficult editing job to be rephrasing her work history for her bio in develop. There are only so many ways to say she’s been working in the computer industry for a very long time, in various writing, editing, and programming capacities. The good news is that, having edited develop for five years, she finally qualifies for a sabbatical, which she’ll be taking by the time you read this. She’s sorry to miss Apple’s Worldwide Developers Conference but decided that springtime in Tuscany was a fair tradeoff.• Caroline Rose Editor

Reading notes: Repeated 'develop' masthead text appears mid-body, possibly a running header rather than content. Header line 'develop Issue 26 June 1996 2' and footer-like placement may affect reading order.

Printed dates
June 1996
Languages
English
PDF page 5

TOOLFRONTEND FIXES Thanks to Tim Maroney for his excellent column on ToolServer and CodeWarrior (develop Issue 25). But there’s a bug in ToolFrontEnd that causes CodeWarrior IDE 1.5b2 to throw away the preferences every time I use it. In case you’re interested, I have the solution to the problem. In addition, I’ve fixed a dialog for the CodeWarrior 8 API and cleaned up the code for the new API. This bug aside, this excellent little utility has helped me a lot in my development. — Andreas Magnusson Thank you for the bug report. I’ve created a new version of ToolFrontEnd that contains your bug fixes and others; it can be found on this issue’s CD. The plug-in API was in a state of flux when I wrote ToolFrontEnd — the new API documentation arrived on the day of my deadline for the CD, so there was no opportunity to adapt my first release for it. I’m glad to have helped in your development; that’s the real reason I write these things. — Tim Maroney FONTTOPICT SNAFU Regarding this code in FontToPict in Issue 25’s Print Hints column: MakePSHandle(qdFont, qdStyle, myEncoding, &picCommentHdl); PicComment(kPostScriptHandle, GetHandleSize(picCommentHdl), piccommentHdl); I recall that the second argument to PicComment is a word, which means you can’t have a picture comment bigger than 32767 bytes. I think Type 1 fonts are usually quite close to this size. Should people be worried about this? — Lawrence D’Oliveiro Color me stupid. You’re right, people should be worried about this when they’re sending the whole font. Hopefully you’ll be sending only the portion of the font that you’ll actually need, so the data requirements will be less. But if you’re not, you need to break up the font data or use another mechanism to send it to the printer. Sorry about that. — Dave Polaschek SCRIPTABLE DATABASE UPDATE When I try to use CodeWarrior 7 to compile Greg Anderson’s Scriptable Database 1.0a11 (from his article on whose clause resolution in develop Issue 24), I get the following link error: : mpwexit.c: '__cleanupandexit__' referenced from '_exit' is undefined How can I fix this? — Jean Jourdain You can’t fix it; that version of the Scriptable Database won’t compile with CodeWarrior 7, only with CodeWarrior 6 (I’ll spare you the gory details). But the new version on this issue’s CD (1.0a15) has been updated so that it works fine with CodeWarrior 7 and later. Sorry for any inconvenience. — Dave Johnson GOOD TIMING Thanks to Martin Minow for his “Timing on the Macintosh” article on develop ’s CD. It saved me from having to LETTERS LETTERS 3 ALL OPINIONS ARE INVITED We welcome your letters to the editor, especially regarding articles published in develop. Write to Caroline Rose (crose@apple.com or AppleLink CROSE) or, if technical develop-related questions, to Dave Johnson (dkj@apple.com or AppleLink 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). Address subscription-related queries to order.adc@applelink.apple.com or AppleLink ORDER.ADC.•

Reading notes: Column layout and reading order of the letters are uncertain due to line breaks and interleaved headings Code fragments contain hyphen-free line breaks that may affect exact spelling of identifiers such as piccommentHdl and picCommentHdl

Printed product names
ToolFrontEnd · CodeWarrior IDE 1.5b2 · CodeWarrior 8 · CodeWarrior 7 · CodeWarrior 6 · ToolServer · Scriptable Database 1.0a11 · FontToPict · PicComment · MakePSHandle · mpwexit.c
Printed dates
Issue 25 · Issue 24
Languages
English
PDF page 6

TOOTING OWN OUR HORN: develop WINS BIG IN COMPETITION

hunt down and strangle whoever wrote “you must write an application-defined routine that calculates the elapsed time” in Inside Macintosh: OS Utilities and then didn’t supply one. — Isidore Ducasse Inside Macintosh can’t supply code for everything; I’m glad develop could help fill the gap. Note that the Timing article has been updated on the CD. — Caroline Rose OODL(E)S OF SPEED IN LISP Dave Johnson’s excellent column on OODLs in Issue 24 is informative and straight to the point. When he’s talking about the overhead associated with dynamic languages, however, he’s not quite up to date. Dynamic languages need not be slower than static languages. They can be, if the programmer isn’t interested in speed. But on the other hand, numerical code in a modern LISP is every bit as fast as FORTRAN or C code, if the programmer cares to add a few declarations. There’s no need to add external modules for speed nowadays. True, some dynamic languages have a lot of runtime overhead, but LISP isn’t one of them. This fact needs to be emphasized to programmers, not the obsolete idea that LISP is a slow and memory-hungry dinosaur. Interpreted LISP might have been slow 15 years ago, but so was BASIC. Unfortunately, many programmers still think LISP is interpreted, and the comparison between a compiled language such as modern C or Pascal with an ancient interpreted LISP implementation is simply not fair, nor is it correct. With Common LISP, lexical scoping, and modern compiler technology, LISP can be just as fast as any static language. So, your example of a QuickDraw 3D renderer in LISP is in fact an excellent idea. — Peter Bengtson You’re right, of course. Writing time-critical, number-crunching code in LISP is eminently practical now. Among dynamic languages, LISP in particular has matured in a big way and is now almost a hybrid language: full dynamism if you want it (with some accompanying overhead) or, with appropriate declarations and “explicitness of purpose” by the programmer, the speed (and brittleness!) of a static language. In a sense, it’s the best of both worlds, letting the programmer decide what best fits the situation. So yes, my example was flawed, though I hope the spirit of it came through despite this. — Dave Johnson develop Issue 26 June 1996 4 We’re happy to announce that develop has won top honors in the STC’s 1995 Northern California Technical Communications competition. STC is the Society for Technical Communication, an international organization of more than 18,000 writers, editors, and other technical communicators. In its category of Monthly or Quarterly Magazines, develop won not only the highest-level award, Distinguished Technical Communication, but also Best of Category. It then went on to win a Merit award in the STC’s International Technical Publications Competition. We’re going to indulge ourselves here and list some of the judges’ comments that we’re particularly fond of. The writing was very focused and stuck to the article’s point. All articles seemed very informative. Very well organized and well laid out. The voice is very personable without being overly familiar. The articles use humor appropriately. The material is very readable. develop is a very polished, engaging publication from beginning to end. It’s nice to get feedback like this from the competition judges, but you, our readers, are the judges who count the most. You’re the ones we want to be sure are happy with develop. We’d like to take this opportunity to thank you for the valuable input you’ve given us over the six and a half years of develop’s existence, and to ask you to please keep it coming. Without your support and encouragement — and your critical feedback — we wouldn’t be what we are today. TOOTING OWN OUR HORN: develop WINS BIG IN COMPETITION

Reading notes: Headline is a primary heading taken from the supplied copy; attribution of the 'Issue 26' and 'June 1996' dates to the magazine is inferred from the printed issue line. Printed relative phrases such as '15 years ago' and 'six and a half years' are not calendar dates.

Printed product names
Inside Macintosh: OS Utilities · QuickDraw 3D · FORTRAN · BASIC · develop
Printed dates
1996 · 1995 · 15 years ago · six and a half years
Languages
English
PDF page 7

STEVE FALKENBURG Planning for Mac OS 8 Compatibility PLANNING FOR MAC OS 8 COMPATIBILITY 5 One of the most important goals for Mac OS 8 (formerly known by the development name “Copland”) is the preservation of compatibility with existing applications. Customers consistently rank compatibility as a critical factor in their decision whether to upgrade to a new OS release, with good reason. This article sheds light on what will and won’t be compatible, and gives developers a road map for ensuring compatibility with the Mac OS 8 release. As one of the driving forces behind Mac OS 8, compatibility is at the forefront of the minds of Apple engineers hard at work on this system software release. Given the track record of nearly seamless compatibility with the Power Macintosh, customers will expect their existing applications to run under Mac OS 8 with few or no problems. Apple is working hard to deliver on this promise, and we’re beginning to succeed. Most of the specific information for this article was learned the hard way — by getting many existing applications up and running. Of course, tradeoffs must be made to move the platform forward. If Mac OS 8 were to remain compatible with all Macintosh software, the performance, reliability, and stability of the system would suffer. While some customers have been impressed by the stability of System 7, others would like to experience even fewer crashes and are willing to upgrade some of their software in the process. Apple’s system software needs to be more stable, while still maintaining compatibility with most applications. Luckily, there are quite a few techniques that you can use today and guidelines that you can follow to ensure compatibility with Mac OS 8. This way, you can impress your friends (and confuse your enemies) at compatibility labs by installing your software for the first time under Mac OS 8, and walking away 15 minutes later saying, “Gee, that was easy, everything works!” This is when following all of those Inside Macintosh chapters, develop articles, and Technotes will finally pay off. Don’t panic: Mac OS 8 isn’t the compatibility “day of reckoning” that you’ve had nightmares about. I’m sure many of you have been told by Developer Technical Support, “Here’s a really cool trick, but it may break in the future.” In some cases, “the future” is in fact Mac OS 8, but on the other hand many techniques that are no longer being recommended (which we of course like to call “sick hacks”) will continue to work. STEVE FALKENBURG has worked on Mac OS 8 for several different groups at Apple, starting with being the Mac OS 8 liaison in Developer Technical Support, then moving into the Mac OS 8 High-Level Toolbox group, and finally finding a home in the Mac OS 8 Program Office Engineering Team. Steve is hoping to help ship Mac OS 8 without changing offices or groups again; then he plans to take a long vacation with his wife, Nancy, that doesn’t involve computers or moving boxes.•

Languages
English
PDF page 8

Remember that Mac OS 8 is just the first step in modernizing the Macintosh. Subsequent system releases will include features such as separate address spaces and full preemption for all applications. In the future, discouraged techniques will become areas of incompatibility; so even if your application runs under Mac OS 8, it’s worth cleaning it up in preparation for future systems. In this article, I’ll go over a few things that will no longer work under Mac OS 8 as well as some of the techniques that will continue to work under Mac OS 8 but will break in future systems. For the more heinous examples of these techniques, I won’t give code samples — I don’t want people saying “Hey, I did it just like they did in develop ” as an excuse. I’ll also discuss some specific case histories of application compatibility problems, to further illustrate the need to be proactive when planning for compatibility. For an overview of Mac OS 8, see http://www.macos.apple.com/macos8 on the World Wide Web, or the article “Copland: The Mac OS Moves Into the Future” in develop Issue 22. Other introductory documents can be found on this issue’s CD. Please keep in mind when reading these materials, as well as this article, that the terminology has evolved over time and some of it may change again by the time you read this.• WHAT WORKS AND WHAT DOESN’T Before diving into guidelines, warnings, and examples, we’ll start with an overview of exactly which types of software will be compatible with Mac OS 8, which will need to be updated, and which will need to be redesigned. This article focuses on applications, but an overview of compatibility in general is helpful to set the stage. First, the good news: Well-written applications conforming to Macintosh development guidelines should run without any modification. This includes PowerPC™-native applications as well as emulated applications. Theoretically, you could have written a Macintosh Solitaire game in 1984 that would also run under Mac OS 8. There are, of course, caveats to application compatibility, which will be discussed later in this article. Component software is becoming an important part of the Macintosh experience, and Mac OS 8 will support OpenDoc part editors as well as application-specific plug- ins — again, without any modification. Depending on the “parent” application, there may be issues with plug-in compatibility (as discussed later). Now, the bad news: Existing extensions, control panels, desk accessories, ASLM libraries, and most drivers are unsupported for the Mac OS 8 release. Compatibility tradeoffs needed to be made in these areas to move the system forward and improve system reliability. Macintosh power users often try to impress each other by comparing how many extensions load at startup, gracing their “Welcome to Macintosh” screen with several rows of happy little icons. The proliferation of INITs has made life as a Macintosh user exciting, if a little hazardous. With Mac OS 8, we’re trying to attack the system stability problem head on by providing new, more reliable mechanisms for extensibility and patching. While the original Macintosh was presented as a complete solution, the Mac OS 8 team has realized that third-party extensibility is part of what makes the system great. This has led us to make ease of extensibility a key goal of the system. As with extensions, for each existing code type that’s not supported under Mac OS 8, a new and much improved mechanism will be provided. In other words, we’ll still have MacHack entries for years to come, and they’ll be just as cool but more reliable. develop Issue 26 June 1996 6

Reading notes: Headline is not explicitly printed as a single heading; the title is inferred from the referenced article name. Reading order of the page is partly unclear due to the article's column breaks and footer text.

Printed product names
Mac OS 8 · Macintosh · OpenDoc · Copland: The Mac OS Moves Into the Future · develop
Printed dates
June 1996 · 1984 · Issue 22 · Issue 26
Languages
English
PDF page 9

Other, less common software types are also unsupported. These include Text Services Manager input methods, FSM external file system modules, and debuggers. This article focuses on application-level issues, so I won’t go into a lot of detail in these areas, but a section on migration paths is included in the article. APPLICATION TAXONOMY For the Mac OS 8 release, the types of applications that developers write can be split into several major categories. These categories have been defined by the Mac OS 8 project teams, and work is being done to ensure that each of the application types is fully supported by the Mac OS 8 design. This article doesn’t cover each type in detail, but we’ll use the classifications as guideposts for migration and compatibility plans. USER INTERFACE APPLICATIONS The first, and most familiar, application type is the user interface application . This type makes up the majority of applications on the Macintosh. These applications use windows, menus, and dialogs and are usually document-centric. Examples include ClarisWorks, Quicken, and Microsoft Excel. There are three variants of this application type: Mac OS 8–savvy, minimal-adoption, and Mac OS 8–compatible. Mac OS 8–savvy applications. A Mac OS 8–savvy application is just what you’d think it would be: an application that takes significant advantage of Mac OS 8 features, such as preemptive tasking, improved event delivery, and new user interface features. Because these APIs aren’t available under System 7, a Mac OS 8–savvy application will not run under pre–Mac OS 8 system releases. Note that Mac OS 8–savvy applications still must maintain a cooperatively scheduled task so that they can call the Macintosh Toolbox, and this cooperative task lives in the same address space with all other System 7 and Mac OS 8–savvy applications. It’s possible to have other portions of the application run in separate address spaces, and servers (such as file sharing) are completely protected from applications. Minimal-adoption applications. Not all developers may want to or be able to make the move to a Mac OS 8–only application immediately. The minimal-adoption application type is intended for these situations. The characteristics of this category include “fitting in” with the Mac OS 8 look and feel while still maintaining compatibility with System 7. Some subset of Mac OS 8 features (not APIs) will be available to these applications, such as the removal of the fixed-size Memory Manager heap limitation, and the new-look, theme-specific, user interface elements. This application type is distinguished from System 7 applications by its correct appearance under Mac OS 8 and its adoption of Mac OS 8 features on a runtime-check basis. Mac OS 8–compatible applications. Well-written applications authored originally for pre–Mac OS 8 systems will continue to work under Mac OS 8. If you follow the guidelines in this article and adhere to documented Macintosh application programming practices, your application should be Mac OS 8 compatible. Of course, to take advantage of Mac OS 8 features in your application, you may need to release a new version. REAL-TIME APPLICATIONS Real-time applications are applications that have time constraints on aspects of their behaviors. If these constraints aren’t met, the application either fails or needs to adapt gracefully to these operating conditions. Examples include data collection applications such as LabView, multimedia applications such as Premier, and games such as Marathon. Under Mac OS 8, real-time applications may choose to take advantage of enhanced timing services and preemptive scheduling to improve their performance. PLANNING FOR MAC OS 8 COMPATIBILITY 7

Reading notes: Section headings such as APPLICATION TAXONOMY may be sub-headings rather than the primary heading Page footer '7' and running header are present but not part of the body

Printed product names
ClarisWorks · Quicken · Microsoft Excel · LabView · Premier · Marathon
Languages
English
PDF page 10

In some ways, however, Mac OS 8 provides new challenges to these applications, since virtual memory is always enabled and preemptive scheduling may cause the application to lose control of the CPU in unforeseen situations. That said, performance will be vastly improved from the System 7 Virtual Memory Manager, so this shouldn’t be a concern for most developers. OPENDOC PART EDITORS OpenDoc part editors are a relatively new application type. OpenDoc will continue to be an important direction for document-oriented applications under the Mac OS 8 release. As you’ll see throughout this article, OpenDoc is also a suggested migration path for several types of existing applications. SERVERS Servers are a new concept introduced in Mac OS 8. They’re preemptively scheduled and run in their own protected address spaces. These features provide independence from the cooperative Toolbox environment and mean that servers have greatly enhanced stability, surviving the crashes of applications or other, ill-behaved servers. New reentrant services are provided in Mac OS 8 to make servers possible, including tasking, messaging, memory allocation, file system access, and networking. Only a subset of the Mac OS 8 APIs are available to servers, and this subset does not include the Macintosh Toolbox calls (Window Manager, Menu Manager, QuickDraw, and so on). This means that servers cannot present a user interface. Candidates for servers include World Wide Web Internet servers, virus checkers, and high-end publishing print servers. UTILITY APPLICATIONS Utility applications manage a single window for user interface and have no menu bar. To the user, they aren’t usually considered a separate application. Mac OS 8 will support utility applications as a generalized application type, unlike previous system releases. An additional use of utility applications is to present a user interface on behalf of a server. For example, a utility application could be used to configure an e-mail forwarding server with the proper e-mail addresses. Other examples of this application type include Apple Guide and configuration control panels. OTHER NON-APPLICATION CLASSIFICATIONS Three other classifications that are useful to our discussions but don’t refer to applications are extension libraries, patch libraries, and drivers. Extension libraries. Extension libraries allow additional code to be introduced into the Code Fragment Manager (CFM) closure for an application. An example use of an extension library would be to track software launches and quits through CFM initialization and termination routines to perform software auditing. Patch libraries. Patch libraries allow patches to be installed into applications through data-driven means, simplifying the customization process. Patch libraries apply their patches in only one context, but can be combined with extension libraries to achieve global-effect patching. The Get/SetTrapAddress methods of the past have proven difficult or impossible to maintain and have resulted in greatly decreased system reliability. The patch library mechanism, with associated extension libraries, provide a more than capable replacement for the pre–Mac OS 8 patching methods. Drivers. Under Mac OS 8, the device driver mechanism has been rearchitected to ensure a high-throughput and flexible I/O system. Pre–Mac OS 8 'DRVR'-style drivers are not supported and so need to be rewritten. As we’ll discuss below, some software written as a driver today may be better written as another application type. develop Issue 26 June 1996 8

Reading notes: Running page header 'develop Issue 26 June 1996 8' and section headings may affect reading order.

Printed product names
Mac OS 8 · System 7 Virtual Memory Manager · OpenDoc · Apple Guide
Printed dates
June 1996
Languages
English
PDF page 11

MIGRATION PATHS FOR EXISTING APPLICATIONS The first step in preparing for Mac OS 8 is determining the migration path your application will follow. Depending on what type of application you have today, this could mean a complete rewrite, minor tweaks, or no changes at all. The most important point along the Mac OS 8 migration path is the first one: compatibility. Before determining the best way of moving your application forward, you should ensure that it runs out of the box on Mac OS 8. We’ll discuss compatibility specifics in a later section. Each System 7 application type has a unique migration path; the sections below cover the available options. USER INTERFACE APPLICATIONS As shown in Figure 1, a System 7–based user interface application has several alternatives for migration. The simplest alternative is not to revise the application at all, or, if needed, do the minimum required to make the application Mac OS 8 compatible. Another alternative is to convert the application into an OpenDoc part editor. I’m not going to go into OpenDoc in this article; if you choose this route, see the article “The OpenDoc User Experience” in develop Issue 22 for a good overview of how part editors work from the user’s perspective. If having a single binary for both System 7 and Mac OS 8 is important, the minimal- adoption option may be appropriate. By migrating to minimal adoption, you ensure user interface consistency and may be able to take advantage of a limited number of Mac OS 8 features. For example, more efficient memory management is possible if you restrict yourself to a subset of the Macintosh Memory Manager API and don’t access Memory Manager heap structures directly. The most ambitious path for migration is to make the application Mac OS 8 savvy. This will mean that the same binary won’t run under both System 7 and Mac OS 8. If the application is made Mac OS 8 savvy, it can take advantage of the wide range of preemptive tasking services, efficient event handling, and an object-oriented version of the Macintosh Toolbox. REAL-TIME APPLICATIONS The migration path for a real-time application is more straightforward than for a user interface application (see Figure 2). Either the application can move to Mac OS 8 without changes or it can take advantage of additional real-time features provided by PLANNING FOR MAC OS 8 COMPATIBILITY 9 Mac OS 8–savvy application Minimal-adoption application Mac OS 8–compatible application OpenDoc part editor User interface application Figure 1. The migration path for a user interface application

Reading notes: Figure 1 diagram labels are listed in the source but their layout is not described Page header 'PLANNING FOR MAC OS 8 COMPATIBILITY 9' appears mid-text and may affect reading order

Printed product names
Mac OS 8 · System 7 · OpenDoc · develop
Languages
English