]> git.saurik.com Git - wxWidgets.git/commitdiff
use the new API in the sample as it's more readable
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 1 Apr 2002 21:31:58 +0000 (21:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 1 Apr 2002 21:31:58 +0000 (21:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/exec/exec.cpp

index 50c351e463896676c6ef1601c061126fc70e42e6..14a5ab2d2cffe6d6329ed69893fca454db1cacec 100644 (file)
@@ -475,7 +475,7 @@ void MyFrame::OnKill(wxCommandEvent& WXUNUSED(event))
 void MyFrame::DoAsyncExec(const wxString& cmd)
 {
     wxProcess *process = new MyProcess(this, cmd);
-    m_pidLast = wxExecute(cmd, FALSE /* async */, process);
+    m_pidLast = wxExecute(cmd, wxEXEC_ASYNC, process);
     if ( !m_pidLast )
     {
         wxLogError(_T("Execution of '%s' failed."), cmd.c_str());
@@ -501,7 +501,7 @@ void MyFrame::OnSyncExec(wxCommandEvent& WXUNUSED(event))
 
     wxLogStatus(_T("'%s' is running please wait..."), cmd.c_str());
 
-    int code = wxExecute(cmd, TRUE /* sync */);
+    int code = wxExecute(cmd, wxEXEC_SYNC);
 
     wxLogStatus(_T("Process '%s' terminated with exit code %d."),
                 cmd.c_str(), code);
@@ -577,7 +577,7 @@ void MyFrame::OnExecWithRedirect(wxCommandEvent& WXUNUSED(event))
     else // async exec
     {
         MyPipedProcess *process = new MyPipedProcess(this, cmd);
-        if ( !wxExecute(cmd, FALSE /* async */, process) )
+        if ( !wxExecute(cmd, wxEXEC_ASYNC, process) )
         {
             wxLogError(_T("Execution of '%s' failed."), cmd.c_str());
 
@@ -611,7 +611,7 @@ void MyFrame::OnExecWithPipe(wxCommandEvent& WXUNUSED(event))
 
     // always execute the filter asynchronously
     MyPipedProcess2 *process = new MyPipedProcess2(this, cmd, input);
-    int pid = wxExecute(cmd, FALSE /* async */, process);
+    int pid = wxExecute(cmd, wxEXEC_ASYNC, process);
     if ( pid )
     {
         wxLogStatus(_T("Process %ld (%s) launched."), pid, cmd.c_str());