X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/691745ab412824d74d036930ad69accbe37d97b4..f86a4930f2c69058684496a1882343fe8e709bf2:/src/osx/cocoa/filedlg.mm diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index 49e8680f06..85ac597d3f 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -187,13 +187,20 @@ bool HasAppKit_10_6() IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase) -wxFileDialog::wxFileDialog( +void wxFileDialog::Init() +{ + m_filterIndex = -1; + m_delegate = nil; + m_sheetDelegate = nil; +} + +void wxFileDialog::Create( wxWindow *parent, const wxString& message, const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, long style, const wxPoint& pos, const wxSize& sz, const wxString& name) - : wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name) { - m_filterIndex = -1; + wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name); + m_sheetDelegate = [[ModalDialogDelegate alloc] init]; [(ModalDialogDelegate*)m_sheetDelegate setImplementation: this]; } @@ -463,7 +470,6 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) } NSView* accView = nil; - m_delegate = nil; if ( m_useFileTypeFilter ) {