]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/utilsexc.mm
Calculate correct client size for windows that are using deferred sizing.
[wxWidgets.git] / src / cocoa / utilsexc.mm
index 7d01c682fca935725c7802c9f7a20ec165b5a5ff..5d7fe82113b779eac21ce943ec199fc40a8adee2 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        utilsexec.mm
+// Name:        src/cocoa/utilsexec.mm
 // Purpose:     Execution-related utilities for wxCocoa
 // Author:      Ryan Norton
 // Modified by:
@@ -7,11 +7,17 @@
 // RCS-ID:      $Id$
 // Copyright:   (c) Ryan Norton
 // Licence:    wxWindows licence
+// Notes:       This code may be useful on platforms other than Darwin.
+//              On Darwin we share the CoreFoundation code with wxMac.
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
 #endif
+#include "wx/unix/execute.h"
+#include "wx/utils.h"
+
+#if 0
 
 #include "wx/utils.h"
 
 #import <Foundation/Foundation.h>
 #import <AppKit/NSWorkspace.h>
 
+//
+// RN:  This is a prelimenary implementation - simple
+// launching and process redirection works,
+// but with the piping tests in the exec sample
+// SIGPIPE is triggered...
+//
+
 class wxPipeInputStream : public wxInputStream
 {
 public:
@@ -119,8 +132,8 @@ protected:
 @end
 
 long wxExecute(const wxString& command, 
-                int sync = wxEXEC_ASYNC
-                wxProcess *handle = NULL)
+                int sync, 
+                wxProcess *handle)
 {
     NSTask* theTask = [[NSTask alloc] init];
     
@@ -142,21 +155,21 @@ long wxExecute(const wxString& command,
     NSArray* theQuoteArguments = 
         [wxNSStringWithWxString(command) componentsSeparatedByString:@"\""];
         
-    NSMutableArray* theSeperatedArguments = 
+    NSMutableArray* theSeparatedArguments = 
         [NSMutableArray arrayWithCapacity:10];
         
     for (unsigned i = 0; i < [theQuoteArguments count]; ++i)
     {
-        [theSeperatedArguments addObjectsFromArray:
+        [theSeparatedArguments addObjectsFromArray:
             [[theQuoteArguments objectAtIndex:i] componentsSeparatedByString:@" "]
         ];
         
         if(++i < [theQuoteArguments count])
-            [theSeperatedArguments addObject:[theQuoteArguments objectAtIndex:i]];
+            [theSeparatedArguments addObject:[theQuoteArguments objectAtIndex:i]];
     }
     
-    [theTask setLaunchPath:[theSeperatedArguments objectAtIndex:0]];
-    [theTask setArguments:theSeperatedArguments];
+    [theTask setLaunchPath:[theSeparatedArguments objectAtIndex:0]];
+    [theTask setArguments:theSeparatedArguments];
     [theTask launch];
     
     if(sync & wxEXEC_ASYNC)
@@ -172,4 +185,6 @@ long wxExecute(const wxString& command,
         
         return [theTask terminationStatus];
     }                      
-}
\ No newline at end of file
+}
+#endif //0
+