X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..7d6a4d96961eac84d05db8bb24c64d39003f6e54:/src/cocoa/utilsexc.mm?ds=inline diff --git a/src/cocoa/utilsexc.mm b/src/cocoa/utilsexc.mm index 20d6e25688..7df71bf321 100644 --- a/src/cocoa/utilsexc.mm +++ b/src/cocoa/utilsexc.mm @@ -21,11 +21,18 @@ #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 #import @@ -99,6 +106,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 +138,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 +184,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;