+ wxASSERT_MSG(parentWindow, "Window modal display requires parent.");
+
+ if (parentWindow)
+ {
+ NSWindow* nativeParent = parentWindow->GetWXWindow();
+ [oPanel beginSheetForDirectory:dir.AsNSString() file:nil types: nil
+ modalForWindow: nativeParent modalDelegate: m_sheetDelegate
+ didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:)
+ contextInfo: nil];
+ }
+}
+
+int wxDirDialog::ShowModal()
+{
+ wxCFEventLoopPauseIdleEvents pause;
+
+ NSOpenPanel *oPanel = [NSOpenPanel openPanel];
+ [oPanel setCanChooseDirectories:YES];
+ [oPanel setResolvesAliases:YES];
+ [oPanel setCanChooseFiles:NO];
+