<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000">You can also use the connectTo method as follows which will give you input as well from the terminal<br>It seems to still work in this version<br><br>Public $Pipeout As File<br>Public $MyPipeIn As File<br>Public $MyPipeOut As File<br>Private $PipeIn As File<br><br><br>Public Sub Form_Open()<br><br> outputterm.Show()<br> outputterm.tv1.Show()<br> Wait<br> <br>End<br><br><br>Public Sub Button1_Click()<br><br> Dim reader As String<br> Print "Hello world"<br> <br> $PipeOut = Pipe "/tmp/xx" For Write<br> $MyPipeOut = Pipe "/tmp/yy" For Write<br> <br> $PipeIn = Pipe "/tmp/xx" For Read<br> $MyPipeIn = Pipe "/tmp/yy" For Read Watch<br> <br> outputterm.tv1.ConnectTo($MyPipeOut, $PipeIn, Null)<br> <br> Output To $PipeOut<br> <br> Print "hello"<br> outputterm.tv1.Print("this")<br> Wait<br> <br> Print "this is a good time for happy thoughts"<br> Wait<br> <br> Print "This is the time to run"<br> Wait<br> <br>End<br><br>Public Sub Button2_Click()<br><br> Print TextEditor1.text<br><br>End<br><br>Public Sub file_read()<br><br> Debug "Read Called"<br> <br> Dim Buffer As String<br> Read #$MyPipeIn, Buffer, -256<br> Print Buffer<br> Debug buffer<br> <br>End<br><br><div id="f5eda3cc-6016-4a73-8ad1-84632f761d74" data-marker="">Thank You<br>Brian G</div><br><hr id="zwchr" data-marker=""><div data-marker=""><b>From: </b>"gen braga" <genbraga1@gmail.com><br><b>To: </b>"Gambas mailing list" <user@lists.gambas-basic.org><br><b>Sent: </b>Monday, January 27, 2020 11:20:37 AM<br><b>Subject: </b>Re: [Gambas-user] Redirect default output to terminalview<br></div><br><div data-marker=""><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Is It possible to redirect the default output (or even debug) to a terminalview?<br>
<br>
The output of what? As far as I understand it, the output of any command executed in the TerminalView (.Shell or .Exec) will <br>
automatically be displayed in that view.<br></blockquote></div><div dir="auto"><br></div><div dir="auto">As I said, the default (or debug) output. The one you get with</div><div dir="auto"><br></div><div dir="auto">Print "something"</div><div dir="auto"><br></div><div dir="auto">Or </div><div dir="auto"><br></div><div dir="auto">Debug "something"</div><div dir="auto"><br></div><div dir="auto">Instead of simply the output from .Shell or .Exec methods.</div><div dir="auto"><br></div><div dir="auto">The Print method can get the job done, but my goal was to redirect any "print". Like using the "OUTPUT TO" instruction.</div><div dir="auto"><br></div><div dir="auto">Anyway, thanks for your reply, I really missed the print method.</div><div dir="auto"><br></div><div dir="auto">-</div><div dir="auto">Gen</div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div>
<br><br>----[ http://gambaswiki.org/wiki/doc/netiquette ]----<br></div></div></body></html>