Przeglądaj źródła

* use a PO flag to run idle event. This allows both cases (slow, long term input, and short, quick input) to run without derivation of the class for runcommand.

git-svn-id: trunk@44496 -
marco 5 lat temu
rodzic
commit
07ee8948aa

+ 1 - 1
packages/fcl-process/src/process.pp

@@ -27,7 +27,7 @@ Type
                     poNoConsole,poNewConsole,
                     poDefaultErrorMode,poNewProcessGroup,
                     poDebugProcess,poDebugOnlyThisProcess,
-                    poPassInput);
+                    poPassInput,porunidle);
 
   TShowWindowOptions = (swoNone,swoHIDE,swoMaximize,swoMinimize,swoRestore,swoShow,
                         swoShowDefault,swoShowMaximized,swoShowMinimized,

+ 1 - 1
packages/fcl-process/src/processbody.inc

@@ -562,7 +562,7 @@ begin
         if assigned(stderr) then
             gotoutputstderr:=ReadInputStream(StdErr,StdErrBytesRead,StdErrLength,StdErrString,1);
  
-        if not gotoutput and not gotoutputstderr and Assigned(FOnRunCommandEvent) Then
+        if (porunidle in options) and not gotoutput and not gotoutputstderr and Assigned(FOnRunCommandEvent) Then
           FOnRunCommandEvent(self,Nil,RunCommandIdle,'');
       end;
     // Get left output after end of execution