// Because we do not release on close, the following release matches the
// above alloc and thus the retain count will be 1.
[m_cocoaNSWindow release];
// Because we do not release on close, the following release matches the
// above alloc and thus the retain count will be 1.
[m_cocoaNSWindow release];
NSApplication *theNSApp = wxTheApp->GetNSApplication();
// If the app hasn't started, flush the event queue
// If we don't do this, the Dock doesn't get the message that
NSApplication *theNSApp = wxTheApp->GetNSApplication();
// If the app hasn't started, flush the event queue
// If we don't do this, the Dock doesn't get the message that
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( this );
GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( this );
GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog