[Gambas-user] Close the Application Stream
james
james at lixce.com
Thu Dec 12 04:42:54 CET 2019
I'm writing a library to provide GUI spell checking to my programs and a stand alone GUI spell checker using aspell. To provide some backward compatibility I want to be able to pass words this way:
echo wrld | lixce-aspell -a (the way aspell works on the command line)
I can accomplish this using:
Public Sub Application_Read()
Dim sLine As String
Read #Last, sLine, -256
Print "Found this on stdIn: " & Trim$(sLine)
Close #Last
End
This works fine when I use the command line above.
THE PROBLEM IS: I cannot figure out how to close the Application Stream when I start the program WITHOUT pipeing anything to it.
I have tried:
Close #Application 'Result: "bad use of virtual class"
Close #Last 'Result: "Null Object"
Close Application_Read 'Result: "Wanted Stream, got function"
Application_Read() 'Result "Null Object"
Any suggestions would be appreciated.
Regards, -j
More information about the User
mailing list