Type Method

descriptorWithDescriptorType:data:

Creates a descriptor initialized with the specified event type that stores the specified data (from an instance of NSData).

Declaration

+ (NSAppleEventDescriptor *)descriptorWithDescriptorType:(DescType)descriptorType data:(NSData *)data;

Parameters

descriptorType

The descriptor type to be set in the returned descriptor.

data

The data, as an instance of NSData, to be set in the returned descriptor.

Return Value

A descriptor with the specified type and data, or nil if an error occurs.

Discussion

You can use this method to create a descriptor that you can build into a complete Apple event by calling methods such as setAttributeDescriptor:forKeyword:, setDescriptor:forKeyword:, and setParamDescriptor:forKeyword:.

See Also

Creating and Initializing Descriptors

+ appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:

Creates a descriptor that represents an Apple event, initialized according to the specified information.

+ descriptorWithBoolean:

Creates a descriptor initialized with type typeBoolean that stores the specified Boolean value.

+ descriptorWithDescriptorType:bytes:length:

Creates a descriptor initialized with the specified event type that stores the specified data (from a series of bytes).

+ descriptorWithEnumCode:

Creates a descriptor initialized with type typeEnumerated that stores the specified enumerator data type value.

+ descriptorWithInt32:

Creates a descriptor initialized with Apple event type typeSInt32 that stores the specified integer value.

+ descriptorWithString:

Creates a descriptor initialized with type typeUnicodeText that stores the text from the specified string.

+ descriptorWithTypeCode:

Creates a descriptor initialized with type typeType that stores the specified type value.

+ listDescriptor

Creates and initializes an empty list descriptor.

+ nullDescriptor

Creates and initializes a descriptor with no parameter or attribute values set.

+ recordDescriptor

Creates and initializes a descriptor for an Apple event record whose data has yet to be set.

- initListDescriptor

Initializes a newly allocated instance as an empty list descriptor.

- initRecordDescriptor

Initializes a newly allocated instance as a descriptor that is an Apple event record.

- initWithAEDescNoCopy:

Initializes a newly allocated instance as a descriptor for the specified Carbon AEDesc structure.

- initWithDescriptorType:bytes:length:

Initializes a newly allocated instance as a descriptor with the specified descriptor type and data (from an arbitrary sequence of bytes and a length count).

- initWithDescriptorType:data:

Initializes a newly allocated instance as a descriptor with the specified descriptor type and data (from an instance of NSData).

- initWithEventClass:eventID:targetDescriptor:returnID:transactionID:

Initializes a newly allocated instance as a descriptor for an Apple event, initialized with the specified values.