]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/utils.mm
Update documentation about custom schemes and virtual file systems.
[wxWidgets.git] / src / osx / cocoa / utils.mm
index c7879d0e6bacc5af3e881aed6017b229b40b01c3..cb71db77a3ddf87f4c6620d97abec03cebb9a968 100644 (file)
@@ -55,12 +55,18 @@ void wxBell()
     wxUnusedVar(application);
 }
 
-- (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename
+- (void)application:(NSApplication *)sender openFiles:(NSArray *)fileNames
 {
     wxUnusedVar(sender);
-    wxCFStringRef cf(wxCFRetain(filename));
-    wxTheApp->MacOpenFile(cf.AsString()) ;
-    return YES;
+    wxArrayString fileList;
+    size_t i;
+    const size_t count = [fileNames count];
+    for (i = 0; i < count; i++)
+    {
+        fileList.Add( wxCFStringRef::AsString([fileNames objectAtIndex:i]) );
+    }
+
+    wxTheApp->MacOpenFiles(fileList);
 }
 
 - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender