]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/filedlg.mm
Get the OS X Cocoa native combobox building by having the native code compile if...
[wxWidgets.git] / src / osx / cocoa / filedlg.mm
index 4a9d65fbc9d84457c59a57711d168580c67ed221..727e9fe1a3e635273fc8fd0c1fd398104d441a18 100644 (file)
@@ -153,11 +153,12 @@ int wxFileDialog::ShowModal()
 
     m_path = wxEmptyString;
     m_fileNames.Clear();
-    
+    m_paths.Clear();
+
     wxNonOwnedWindow* parentWindow = NULL;
     int returnCode = -1;
-    
-    if (GetParent()) 
+
+    if (GetParent())
     {
         parentWindow = dynamic_cast<wxNonOwnedWindow*>(wxGetTopLevelParent(GetParent()));
     }
@@ -181,10 +182,10 @@ int wxFileDialog::ShowModal()
         if (parentWindow)
         {
             NSWindow* nativeParent = parentWindow->GetWXWindow();
-            ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; 
-            [sPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString() 
-                modalForWindow: nativeParent modalDelegate: sheetDelegate 
-                didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) 
+            ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init];
+            [sPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString()
+                modalForWindow: nativeParent modalDelegate: sheetDelegate
+                didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:)
                 contextInfo: nil];
             [sheetDelegate waitForSheetToFinish];
             returnCode = [sheetDelegate code];
@@ -195,7 +196,7 @@ int wxFileDialog::ShowModal()
         {
             returnCode = [sPanel runModalForDirectory:dir.AsNSString() file:file.AsNSString() ];
         }
-        
+
         if (returnCode == NSOKButton )
         {
             panel = sPanel;
@@ -220,11 +221,11 @@ int wxFileDialog::ShowModal()
         if (parentWindow)
         {
             NSWindow* nativeParent = parentWindow->GetWXWindow();
-            ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; 
-            [oPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString() 
-                types: types modalForWindow: nativeParent 
-                modalDelegate: sheetDelegate 
-                didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) 
+            ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init];
+            [oPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString()
+                types: types modalForWindow: nativeParent
+                modalDelegate: sheetDelegate
+                didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:)
                 contextInfo: nil];
             [sheetDelegate waitForSheetToFinish];
             returnCode = [sheetDelegate code];
@@ -233,7 +234,7 @@ int wxFileDialog::ShowModal()
         else
 */
         {
-            returnCode = [oPanel runModalForDirectory:dir.AsNSString() 
+            returnCode = [oPanel runModalForDirectory:dir.AsNSString()
                         file:file.AsNSString() types:types];
         }
         if (returnCode == NSOKButton )