Show(false);
}
+void wxDialog::EndDialog(int retCode)
+{
+ if(IsModal())
+ EndModal(retCode);
+ else
+ Show(false);
+}
+
void wxDialog::OnCloseWindow(wxCloseEvent& event)
{
// We'll send a Cancel message by default,
{
if ( Validate() && TransferDataFromWindow() )
{
- EndModal(wxID_OK);
+ EndDialog(wxID_OK);
}
}
void wxDialog::OnCancel(wxCommandEvent& event)
{
wxLogTrace(wxTRACE_COCOA,wxT("Cancelled!"));
- EndModal(wxID_CANCEL);
+ EndDialog(wxID_CANCEL);
}