Contents

AEStreamOpenKeyDesc(_:_:_:)

Marks the beginning of a key descriptor in an AEStreamRef.

Declaration

func AEStreamOpenKeyDesc(_ ref: AEStreamRef!, _ key: AEKeyword, _ newType: DescType) -> OSStatus

Parameters

  • ref:

    An Aestreamref containing the stream data.

  • key:

    The AEKeyword associated with the new descriptor being added to the stream. See Aekeyword.

  • newType:

    A type code for the new AEDesc being added to the stream. See Desctype.

Return Value

A result code. See Result Codes.

Discussion

Use this routine to mark the beginning of a keyword/descriptor definition in an Apple event record. After calling this routine, you should call AEStreamWriteData(_:_:_:) one or more times to write the record data to the stream. When you are done writing data, you must call AEStreamCloseDesc(_:) to complete the record definition.

This routine must be called only as part of an Apple event record definition. You cannot use this routine to write keyword/descriptor definitions to other descriptor types, such as an AEDesc or AEDescList, even if those types are nested inside an Apple event record. In situations where you need to create nested records, this routine opens a new keyword/descriptor definition in the Apple event record associated with the most recent call to AEStreamOpenRecord(_:_:).

See Also

Creating Apple Event Structures Using Streams