Important: The information in this document is obsolete and should not be used for new development.
SetDefaultComponent
TheSetDefaultComponentfunction 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 theOpenDefaultComponentandFindNextComponentfunctions.
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
componentFlagsfield during the reorder operation.defaultComponentAnyManufacturer- The Component Manager ignores the value of the
componentManufacturerfield during the reorder operation.defaultComponentAnySubType- The Component Manager ignores the value of the
componentSubTypefield during the reorder operation.DESCRIPTION
TheSetDefaultComponentfunction 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 theflagsparameter.SPECIAL CONSIDERATIONS
Note that theSetDefaultComponentfunction 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