Handling “Open Document” (odoc) events in Snow Leopard
问题 I have code in my application that response to "Open Document" (odoc) events. In Mac OS X Tiger and Leopard, this code works fine: - (void) handleOpenDocumentEvent: (NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent { NSAppleEventDescriptor const *const dirObj = [event descriptorForKeyword:keyDirectObject]; DescType const dirObjType = [dirObj descriptorType]; if ( dirObjType == 'alis' ) { // // Open a single file. // NSData const *const data = [dirObj data];