[Gambas-user] Application_Read
tobias
tobiasboe1 at ...20...
Sat Jul 23 17:39:39 CEST 2011
On 23.07.2011 16:15, Demosthenes Koptsis wrote:
> i am sure that there is a bug.
>
> Please see the project.
why should it be a bug? it looks more like a design issue but that's
just a thought...
so, you use sBuf as a global variable this is the errors reason because
in this case it actually is a dynamic symbol.
use a local variable...
this is where i got so far:
Public Sub _new()
Print "My pid is: " & Application.Handle
End
Static Public Sub Application_Read()
Dim sBuf As String
sBuf = Read Lof()
Print sBuf
End
sorry, i didn't notice that the read syntax changed in gambas3... but it
still doesn't work, i can't get any data from stdin. i thought that
reading from Last was wrong but the syntax i use now should read from
stdin (Line Input sBuf doesn't work, too). i only get empty lines over
and over...
i call the program with:
$ echo "test" | ./Project_133_.gambas
and data seems to arrive at stdin because the Print inside
Application_Read is called... i can't imagine where the mistake is now.
and additionally i don't see any way to fill your textarea. (you cannot
access anything non-static from Application_Read, neither variables nor
functions)
More information about the User
mailing list