]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/utilsexc.mm
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / src / cocoa / utilsexc.mm
index 20d6e25688e65ce60050234b416ca25db0a7b1a4..88d479486c407c65641463ab2717572bde59bbcc 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Ryan Norton
 // Modified by:
 // Created:     2004-10-05
-// RCS-ID:      $Id$
 // Copyright:   (c) Ryan Norton
 // Licence:     wxWindows licence
 // Notes:       This code may be useful on platforms other than Darwin.
     #include "wx/utils.h"
 #endif
 
-#include "wx/unix/execute.h"
-
 #if 0
 
+#ifndef   WX_PRECOMP
+    #if wxUSE_STREAMS
+        #include  "wx/stream.h"
+    #endif // wxUSE_STREAMS
+#endif  //WX_PRECOMP
+
 #include "wx/process.h"
-#include "wx/stream.h"
 
 #include "wx/cocoa/string.h"
 
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
 #import <Foundation/Foundation.h>
 #import <AppKit/NSWorkspace.h>
 
@@ -99,6 +103,7 @@ protected:
 -(id)init:(void*)handle processIdentifier:(long)pid;
 - (void)termHandler:(NSNotification *)aNotification;
 @end
+WX_DECLARE_GET_OBJC_CLASS(wxTaskHandler,NSObject)
 
 @implementation wxTaskHandler : NSObject
 
@@ -130,10 +135,12 @@ protected:
 }
 
 @end
+WX_IMPLEMENT_GET_OBJC_CLASS(wxTaskHandler,NSObject)
 
 long wxExecute(const wxString& command,
                int sync,
-               wxProcess *handle)
+               wxProcess *handle,
+               const wxExecuteEnv *env)
 {
     NSTask* theTask = [[NSTask alloc] init];
 
@@ -174,7 +181,7 @@ long wxExecute(const wxString& command,
 
     if(sync & wxEXEC_ASYNC)
     {
-        [[wxTaskHandler alloc]init:handle
+        [[WX_GET_OBJC_CLASS(wxTaskHandler) alloc]init:handle
                               processIdentifier:[theTask processIdentifier]];
 
         return 0;