X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/906c935a80b10d53cecf57f71ab5f3f4f1d529ec..fe104ff925ac53779d25280112401874089276b0:/src/osx/cocoa/utils.mm?ds=sidebyside diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index c7879d0e6b..cb71db77a3 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -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