Important: The information in this document is obsolete and should not be used for new development.
SetDefaultComponent
TheSetDefaultComponent
function allows your component to change the search order for registered components. You specify a component that is to be placed at the front of the search chain, along with control information that governs the reordering operation. The order of the search chain influences which component the Component Manager selects in response to an application's use of theOpenDefaultComponent
andFindNextComponent
functions.
FUNCTION SetDefaultComponent (aComponent: Component; flags: Integer): OSErr;
aComponent
- A component identifier that specifies the component for this operation.
flags
- A value specifying the control information governing the operation. The value of this parameter controls which component description fields the Component Manager examines during the reorder operation. Set the appropriate flags to 1 to define the fields that are examined during the reorder operation. The following flags are defined:
defaultComponentIdentical
- The Component Manager places the specified component in front of all other components that have the same component description.
defaultComponentAnyFlags
- The Component Manager ignores the value of the
componentFlags
field during the reorder operation.defaultComponentAnyManufacturer
- The Component Manager ignores the value of the
componentManufacturer
field during the reorder operation.defaultComponentAnySubType
- The Component Manager ignores the value of the
componentSubType
field during the reorder operation.DESCRIPTION
TheSetDefaultComponent
function changes the search order of registered components by moving the specified component to the front of the search chain, according to the value specified in theflags
parameter.SPECIAL CONSIDERATIONS
Note that theSetDefaultComponent
function changes the search order for all applications. As a result, you should use this function carefully.RESULT CODES
noErr 0 No error invalidComponentID -3000 No component has this component identifier