Instance Method

insertDescriptor:atIndex:

Inserts a descriptor at the specified (one-based) position in the receiving descriptor list, replacing the existing descriptor, if any, at that position.

Declaration

- (void)insertDescriptor:(NSAppleEventDescriptor *)descriptor atIndex:(NSInteger)index;

Parameters

descriptor

The descriptor to insert in the receiver. Specifying an index of 0 or count + 1 causes appending to the end of the list.

anIndex

The one-based descriptor list position at which to insert the descriptor.

Discussion

Because it actually replaces the descriptor, if any, at the specified position, this method might better be called replaceDescriptor:atIndex:. The receiver must be a list descriptor. The indices are one-based. Currently provides no indication if an error occurs.

See Also

Working With List Descriptors

- descriptorAtIndex:

Returns the descriptor at the specified (one-based) position in the receiving descriptor list.

- removeDescriptorAtIndex:

Removes the descriptor at the specified (one-based) position in the receiving descriptor list.