Le 16/01/2013 17:32, Tobias Boege a écrit : > Hi Benoit, > > we noticed that the Read and Error events of a newly started Process don't > fire up when a former process was killed and the variable holding that > process gets filled with the new one which in turn shows the symptoms above. > > To reproduce, open and start the attached project and > > 1. Start the process > 2. Verify that it works by sending the sample command > 3. Kill the process > 4. Restart it > 5. Send another command which yields nothing > 6. Kill the process and see the output being flushed into the TextArea > > This does not happen when step 3 reads "Start/Replace the process" > (consequently step 4 would be useless but the result is indifferent). > > You will find a NOTE line in the source code. If one, before the new Process > gets started, assigns Null to the Process variable, everything seems to > work and output comes in instantly. Please tell me what is not supposed to > be done in a certain way there. > > It was somewhat difficult to reproduce the issue in a smaller project than > the original one. I couldn't find any alternative to the 'bc' program. Hope > you can bear that dependency. > > Regards, > Tobi >
That bug should be fixed in revision #5511. As for your comment: BTW: Doesn't Gambas support "short-circuit evaluation"?... Are you looking for the following syntax? If $hProcess And If $hProcess.State = Process.Running Then Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user