Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To open a whole bunch of files at once, send the shared NSWorkspace object <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWorkspace/openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:" rel="nofollow noreferrer">an <code>openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:</code> message</a>, or call <a href="http://developer.apple.com/mac/library/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/LSOpenURLsWithRole" rel="nofollow noreferrer">the <code>LSOpenURLsWithRole</code> function</a> or <a href="http://developer.apple.com/mac/library/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/LSOpenFromURLSpec" rel="nofollow noreferrer">the <code>LSOpenFromURLSpec</code> function</a>. Either way, you'll pass an array of URLs to items to open.</p> <p>Each one of these will let you identify a specific application to use. NSWorkspace lets you specify it by bundle identifier, while the two Launch Services functions let you provide the URL or <code>FSRef</code> to a specific application bundle.</p> <blockquote> <p>… it must invoke the target app's openFiles NSApplication delegate method</p> </blockquote> <p>That isn't possible to require, because (a) the application may be document-based, in which case it probably does not have an NSApplication delegate and, even if it does, such a delegate would probably not respond to <code>application:openFiles:</code>, and (b) the application may not be Cocoa-based, in which case it would handle the Open Documents Apple Event directly. None of this is your application's business, so don't worry about it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload