Inserts a descriptor at the specified (one-based) position in the receiving descriptor list, replacing the existing descriptor, if any, at that position.
SDK
- macOS 10.0+
Framework
- Foundation
Declaration
func insert(_ descriptor: NSApple Event Descriptor, at index: Int)
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 replace
. The receiver must be a list descriptor. The indices are one-based. Currently provides no indication if an error occurs.