[Gambas-user] Application_Read

Benoît Minisini gambas at ...1...
Sun Jul 24 00:11:01 CEST 2011


> > I don't know what you are talking about. I was sending a fixed project
> > for Demosthene. Please send your project so that I can take a look at
> > it!
> > 
> > Regards,
> 
> oh god, i didn't notice the attachment... it really works. ah, i see
> Lof() returns 0 on stdin, of course...
> but there is something i don't understand, i altered the working code to
> check Lof():
> Static Public Sub Application_Read()
> 
>    Dim sBuf As String
> 
>    Print Lof()
>    sBuf = Read -256
>    FMain.Insert(sBuf)
> 
> End
> 
> and now it permanently Prints zeros into my terminal, which means that
> the Application_Read() is called all the time, but nothing is inserted
> into the textarea, not even an empty string as i expected. what is going
> on?
> 

I noticed that, I must investigate. It happens when you run the project from 
the IDE without a true terminal.

In that case, the standard streams are redirected to pipes created by the IDE 
when running the project. And these pipes don't seem to behave like terminal 
file descriptors!

-- 
Benoît Minisini




More information about the User mailing list