FROM : James Bucanek
DATE : Mon Apr 09 17:13:34 2007
I'm sending open AppleEvents to an application from a mixture of Carbon and Cocoa (some PlugIns, some daemones, some applications, ... it's a real menagerie). I need to send additional parameters in the event to tell the application the location in the document to display.
When I send the open event using LSOpenFromRefSpec, the AEDesc *passThruParams parameter gets inserted into the event. I can extract the parameter by fetching the AppleEvent descriptor for keyAEPropData. That's working just fine.
However, when I used the (I thought) equivalent Cocoa call -[NSWorkspace openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:], the NSAppleEventDescriptor that I pass for additionalEventParamDescriptor: seems to go into a black hole. The application receiving the event dumps the value of [NSAppleEventManager currentAppleEvent] to the console. When I use LSOpenFromRefSpce, the additional parameter is there. When using the NSWorkspace method, the open event contains no additional information that I can see.
The documentation for additionalEventParamDescriptor:(NSAppleEventDescriptor *)descriptor has the following to say:
Additional options specified in an AppleEvent-style descriptor. For
example, you could use this parameter to specify additional documents
to open when the application is launched.
So where, exactly, do these "additional options" go? Anyone have a clue or how to get them into keyAEPropData?
--
James Bucanek
DATE : Mon Apr 09 17:13:34 2007
I'm sending open AppleEvents to an application from a mixture of Carbon and Cocoa (some PlugIns, some daemones, some applications, ... it's a real menagerie). I need to send additional parameters in the event to tell the application the location in the document to display.
When I send the open event using LSOpenFromRefSpec, the AEDesc *passThruParams parameter gets inserted into the event. I can extract the parameter by fetching the AppleEvent descriptor for keyAEPropData. That's working just fine.
However, when I used the (I thought) equivalent Cocoa call -[NSWorkspace openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:], the NSAppleEventDescriptor that I pass for additionalEventParamDescriptor: seems to go into a black hole. The application receiving the event dumps the value of [NSAppleEventManager currentAppleEvent] to the console. When I use LSOpenFromRefSpce, the additional parameter is there. When using the NSWorkspace method, the open event contains no additional information that I can see.
The documentation for additionalEventParamDescriptor:(NSAppleEventDescriptor *)descriptor has the following to say:
Additional options specified in an AppleEvent-style descriptor. For
example, you could use this parameter to specify additional documents
to open when the application is launched.
So where, exactly, do these "additional options" go? Anyone have a clue or how to get them into keyAEPropData?
--
James Bucanek
| Related mails | Author | Date |
|---|---|---|
| James Bucanek | Apr 9, 17:13 | |
| has | Apr 11, 12:31 | |
| Steve Evangelou | Apr 11, 19:30 |






Cocoa mail archive

