]> git.saurik.com Git - wxWidgets.git/commitdiff
EndModal() isn't called twice any more
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 23 Mar 1999 15:52:39 +0000 (15:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 23 Mar 1999 15:52:39 +0000 (15:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dialogs/Makefile.in
samples/dialogs/dialogs.cpp

index a4529f0a37d02724d56ded015f78dcde1628aa21..055f586aedbfd806c014e1d5d3c8db9c0875218e 100644 (file)
@@ -7,7 +7,7 @@ OS=@OS@
 RULE=bin
 
 # define library name
-BIN_TARGET=test
+BIN_TARGET=dialogs
 # define library sources
 BIN_SRC=\
 dialogs.cpp
index 257720dc07ccde9f794f5c99ac1288230bbc8c3b..45f60574a7f376486baa8cecb4d184df8ece8f92 100644 (file)
@@ -121,7 +121,7 @@ void MyFrame::ChooseColour(wxCommandEvent& WXUNUSED(event) )
         myCanvas->Clear();
         myCanvas->Refresh();
       }
-      dialog->Close();
+      dialog->Destroy();
 }
 
 void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) )
@@ -138,7 +138,7 @@ void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) )
         wxGetApp().m_canvasTextColour = retData.GetColour();
         myCanvas->Refresh();
       }
-      dialog->Close();
+      dialog->Destroy();
 }
 
 #if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW
@@ -162,7 +162,7 @@ void MyFrame::ChooseColourGeneric(wxCommandEvent& WXUNUSED(event))
         myCanvas->Clear();
         myCanvas->Refresh();
       }
-      dialog->Close();
+      dialog->Destroy();
 }
 
 void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
@@ -179,7 +179,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
         wxGetApp().m_canvasTextColour = retData.GetColour();
         myCanvas->Refresh();
       }
-      dialog->Close();
+      dialog->Destroy();
 }
 #endif
 
@@ -226,7 +226,14 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
 
        if (dialog.ShowModal() == wxID_OK)
        {
-               wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path");
+        wxString info;
+        info.Printf("Full file name: %s\n"
+                    "Path: %s\n"
+                    "Name: %s",
+                    dialog.GetPath().c_str(),
+                    dialog.GetDirectory().c_str(),
+                    dialog.GetFilename().c_str());
+               wxMessageDialog dialog2(this, info, "Selected file");
                dialog2.ShowModal();
        }
 }