Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 6 - Component Manager

Using the Component Manager

This section describes how you can use the Component Manager to

The Component Manager is available in System 7.1 or later and may be present in System 7. To determine whether the Component Manager is available, call the Gestalt function with the gestaltComponentMgr selector and check the value of the response parameter.

   gestaltComponentMgr     = 'cpnt';
The Gestalt function returns in the response parameter a 32-bit value indicating the version of the Component Manager that is installed. Version 3 and above supports automatic version control, the unregister request, and icon families. You should test the version number before using any of these features.

This section presents several examples demonstrating how to use components and the Component Manager. All of these examples use the services of a drawing component--a simple component that draws an object of a particular shape on the screen. Drawing components have a component type of 'draw'. The component subtype value indicates the type of object the component draws. For example, a drawing component that draws an oval has a component subtype of 'oval'. For information on creating your own components and for listings that show the code for a drawing component, see "Creating Components" beginning on page 6-12.

Opening Connections to Components
Getting Information About a Component
Using a Component
Closing a Connection to a Component

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996