X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/530ecef01f7e33c2ec1b8b1ad8025484709bef1d..945a5ae7496862e751be4fec9e592a48cd646a4c:/src/cocoa/utilsexc.mm?ds=inline diff --git a/src/cocoa/utilsexc.mm b/src/cocoa/utilsexc.mm index 348c1c1060..88d479486c 100644 --- a/src/cocoa/utilsexc.mm +++ b/src/cocoa/utilsexc.mm @@ -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. @@ -17,8 +16,6 @@ #include "wx/utils.h" #endif -#include "wx/unix/execute.h" - #if 0 #ifndef WX_PRECOMP @@ -31,6 +28,8 @@ #include "wx/cocoa/string.h" +#include "wx/cocoa/objc/objc_uniquifying.h" + #import #import @@ -104,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 @@ -135,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]; @@ -179,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;