Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Carbon Considerations

If you develop your software using Carbon, there are several things you can do to make your programs work better in Mac OS X. The following sections list migration tips and recommendations for technologies you should be using.

In this section:

Migrating From Mac OS 9
Use the Carbon Event Manager
Use the HIToolbox
Use Nib Files


Migrating From Mac OS 9

If you were a Mac OS 9 developer, the Carbon interfaces should seem very familiar. However, improvements in Carbon have rendered many older technologies obsolete. The sections that follow list both the required and the recommended replacement technologies you should use instead.

Required Replacement Technologies

The technologies listed in Table 8-1 cannot be used in Carbon. You must use the technology in the “Now use” column instead.

Table 8-1  Required replacements for Carbon

Instead of

Now use

Any device manager

I/O Kit

Apple Guide

Apple Help

AppleTalk Manager

BSD sockets or CFNetwork

Help Manager

Carbon Help Manager

PPC Toolbox

Apple events

Printing Manager

Core Printing Manager

QuickDraw 3D

OpenGL

QuickDraw GX

Quartz and Apple Type Services for Unicode Imaging (ATSUI)

Standard File Package

Navigation Services

Vertical Retrace Manager

Time Manager

Recommended Replacement Technologies

The technologies listed in Table 8-2 can still be used in Carbon, but the indicated replacements provide more robust support and are preferred.

Table 8-2  Recommended replacements for Carbon

Instead of

Now use

Display Manager

Quartz Services

Event Manager

Carbon Event Manager

Font Manager

Apple Type Services for Fonts

Internet Config

Launch Services and System Configuration

Open Transport

BSD sockets or CFNetwork

QuickDraw

Quartz 2D

QuickDraw Text

Core Text

Resource Manager

Interface Builder Services

Script Manager

Unicode Utilities

TextEdit

Multilingual Text Engine

URL Access Manager

CFNetwork

Use the Carbon Event Manager

Use of the Carbon Event Manager is strongly recommended for new and existing Carbon applications. The Carbon Event Manager provides a more robust way to handle events than the older Event Manager interfaces. For example, the Carbon Event Manager uses callback routines to notify your application when an event arrives. This mechanism improves performance and offers better mobility support by eliminating the need to poll for events.

For an overview of how to use the Carbon Event Manager, see Carbon Event Manager Programming Guide.

Use the HIToolbox

The Human Interface Toolbox is the technology of choice for implementing user interfaces with Carbon. The HIToolbox extends the Macintosh Toolbox and offers an object-oriented approach to organizing the content of your application windows. This new approach to user interface programming is the future direction for Carbon and is where new development and improvements are being made. If you are currently using the Control Manager and Window Manager, you should consider adopting the HIToolbox.

Note: The HIToolbox interfaces are available for creating 32-bit applications only. If you are creating 64-bit applications, you should use Cocoa for your user interface instead.

For an overview of HIView and other HIToolbox objects, see the documents in Reference Library > Carbon > Human Interface Toolbox.

Use Nib Files

Nib files, which you create with Interface Builder, are the best way to design your application interface. The design and layout features of Interface Builder will help you create Aqua-compliant windows and menus. Even if you do not plan to load the nib file itself, you can still use the metrics from this file in your application code.

For information about using Interface Builder, see Interface Builder User Guide.



< Previous PageNext Page > Hide TOC


Last updated: 2007-10-31




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice