Selaa lähdekoodia

replace use of deprecated runModalForDirectory:file:types:

- Replaced with runModal and setAllowedFileTypes: which
  have been available since 10.3.
Nur Monson 12 vuotta sitten
vanhempi
sitoutus
797e6dc68b
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      Core/Contents/Source/PolyCocoaCore.mm

+ 2 - 1
Core/Contents/Source/PolyCocoaCore.mm

@@ -515,7 +515,8 @@ vector<String> CocoaCore::openFilePicker(vector<CoreFileExtension> extensions, b
 		}
 	}
 	
-	if ( [attachmentPanel runModalForDirectory:nil file:nil types:types] == NSOKButton )
+	[attachmentPanel setAllowedFileTypes:types];
+	if ( [attachmentPanel runModal] == NSOKButton )
 	{
 		NSArray* files = [attachmentPanel URLs];