Function

CreateOffsetDescriptor

Creates an offset descriptor that specifies the position of an element in relation to the beginning or end of its container.

Declaration

OSErr CreateOffsetDescriptor(long theOffset, AEDesc *theDescriptor);

Parameters

theOffset

A positive integer that specifies the offset from the beginning of the container (the first element has an offset of 1), or a negative integer that specifies the offset from the end (the last element has an offset of –1).

theDescriptor

A pointer to a descriptor. On successful return, the offset descriptor created by CreateOffsetDescriptor. On error, returns a null descriptor. Your application must dispose of the descriptor after it has finished using it. See AEDesc.

Return Value

A result code. See Result Codes.

See Also

Creating Object Specifiers

CreateCompDescriptor

Creates a comparison descriptor that specifies how to compare one or more Apple event objects with either another Apple event object or a descriptor.

CreateLogicalDescriptor

Creates a logical descriptor that specifies a logical operator and one or more logical terms for the Apple Event Manager to evaluate.

CreateObjSpecifier

Assembles an object specifier that identifies one or more Apple event objects, from other descriptors.

CreateRangeDescriptor

Creates a range descriptor that specifies a series of consecutive elements in the same container.