O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSAppleEventDescriptor — Mac OS X 10.0

Synopsis

This class is primarily used to retrieve information about an Apple Event in a Cocoa application. A handful of methods in the scripting classes of the Foundation framework either take an event descriptor object or return one. For example, in the class NSAppleScript we expect an NSAppleEventDescriptor object to be returned by the script execution methods. This class is only useful for creating event descriptor objects to return to other objects, or to extract information about an Apple Event descriptor. Currently, Cocoa has no mechanism for sending raw Apple Events; for that you must rely on the Carbon Apple Event APIs.

@interface NSAppleEventDescriptor : NSObject <NSCopying>
                                  // Initializers
   - (id)initListDescriptor;
   - (id)initRecordDescriptor;
   - (id)initWithAEDescNoCopy:(const AEDesc *)aeDesc;
   - (id)initWithDescriptorType:(DescType)descriptorType  
                                 bytes:(const void *)bytes 
                                 length:(unsigned int)byteCount;
   - (id)initWithDescriptorType:(DescType)descriptorType  
                                 data:(NSData *)data;
   - (id)initWithEventClass:(AEEventClass)eventClass 
                                 eventID:(AEEventID)eventID
                                 targetDescriptor:(NSAppleEventDescriptor *)targetDescriptor 
                                 returnID:(AEReturnID)returnID                                
                                 transactionID:(AETransactionID)transactionID;
                                  // Accessor Methods
   - (void)setDescriptor:(NSAppleEventDescriptor *)descriptor 
                                 forKeyword:(AEKeyword)keyword;
   - (void)setAttributeDescriptor ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required