Carbon


AEGetObjectAccessor

Header: AEObjects.h Carbon status: Supported

Gets an object accessor function from an object accessor dispatch table.

OSErr AEGetObjectAccessor (
    DescType desiredClass, 
    DescType containerType, 
    OSLAccessorUPP *accessor, 
    SInt32 *accessorRefcon, 
    Boolean isSysHandler
);
Parameter descriptions
desiredClass

The object class of the Apple event objects located by the object accessor function to get. Pass the value typeWildCard to get an object accessor function whose entry in an object accessor dispatch table specifies typeWildCard as the object class. Pass the value cProperty to get an object accessor function whose entry in an object accessor dispatch table specifies cProperty (a constant used to specify a property of any object class). Some other possible values are defined in “Object Class ID Constants”.

containerType

The descriptor type of the token that identifies the container for the objects located by the requested accessor function. (Token is defined in AEDisposeToken.) Pass the value typeWildCard to get an object accessor function whose entry in an object accessor dispatch table specifies typeWildCard as the descriptor type of the token used to specify the container type.

accessor

A universal procedure pointer. On return, a pointer to the requested object accessor function, if an object accessor dispatch table entry exists that exactly matches the values supplied in the parameters desiredClass and containerType.

accessorRefcon

A pointer to a reference constant. On return, the reference constant from the object accessor dispatch table entry for the specified object accessor function. The reference constant may have a value of 0.

isSysHandler

Specifies the object accessor dispatch table to get the object accessor function from. Pass TRUE to get the object accessor function from the system object accessor dispatch table or FALSE to get the object accessor function from your application’s object accessor dispatch table. Use of the system object accessor dispatch table is not recommended for Carbon applications.

function result

A result code.

DISCUSSION

Calling AEGetObjectAccessor does not remove the object accessor function from an object accessor dispatch table.

VERSION NOTES

A Carbon application should not install an object accessor in a system object accessor dispatch table with the goal that the accessor will get called when other applications resolve objects—this won’t necessarily work. See “Apple Event Dispatching” (to be supplied later) for more information.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)