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: Interapplication Communication /
Chapter 4 - Responding to Apple Events / Reference to Responding to Apple Events
Routines for Responding to Apple Events / Getting Data or Descriptor Records Out of Apple Event Parameters and Attributes


AEGetAttributeDesc

You can use the AEGetAttributeDesc function to get the descriptor record for a specified Apple event attribute.

FUNCTION AEGetAttributeDesc (theAppleEvent: AppleEvent; 
                             theAEKeyword: AEKeyword; 
                             desiredType: DescType; 
                             VAR result: AEDesc): OSErr;
theAppleEvent
The Apple event containing the desired attribute.
theAEKeyword

The keyword that specifies the desired attribute.
TYPE AEKeyword = PACKED ARRAY[1..4] OF Char;
The keyword can be any of the constants listed in the description of AEGetAttributePtr on page 4-72.
desiredType
The desired descriptor type for the descriptor record to be returned; if the requested Apple event attribute is not of this type, the Apple Event Manager attempts to coerce it to this type. If the value of desiredType is typeWildCard, no coercion is performed, and the descriptor type of the returned data is the same as the descriptor type of the Apple event attribute.
result
A copy of the descriptor record from the desired attribute coerced to the descriptor type specified by the desiredType parameter.
DESCRIPTION
The AEGetAttributeDesc function returns, in the result parameter, the descriptor record for the Apple event attribute with the specified keyword. Your application should call the AEDisposeDesc function to dispose of the resulting descriptor record after your application has finished using it.

If AEGetAttributeDesc returns a nonzero result code, it returns a null descriptor record unless the Apple Event Manager is not available because of limited memory.

RESULT CODES
noErr0No error
memFullErr-108Not enough room in heap zone
errAECoercionFail-1700Data could not be coerced to the requested descriptor type
errAEDescNotFound-1701Descriptor record was not found
errAENotAEDesc-1704Not a valid descriptor record
errAEReplyNotArrived-1718Reply has not yet arrived

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996