Contents

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 setAttribute(_:forKeyword:), setDescriptor(_:forKeyword:), and setParam(_:forKeyword:).

See Also

Creating and Initializing Descriptors