[Gambas-user] Gambas-user Digest, Vol 128, Issue 13
Jeff Zacher
ad_sicks at ...43...
Wed Jan 11 13:52:08 CET 2017
> Your mail is seen as spam, raise it with this answer.
> "Test" what kind of file it is?
Just a test file and I 'echo "stuff" > test' or 'echo "Other stuff" >>
test' from another shell.
On 01/10/2017 02:46 PM, gambas-user-request at lists.sourceforge.net wrote:
> Hello Jeff,
> Your mail is seen as spam, raise it with this answer.
> "Test" what kind of file it is?
>
> Regards
> Gianluigi
>
> 2017-01-09 14:35 GMT+01:00 Jeff Zacher <ad_sicks at ...43...>:
>
>> I am using Gambas 3.9.1
>>
>> If I open a file for watch:
>>
>> hFile = Open "test" For Read Write Watch
>>
>> The _Read() event gets the first byte written to the file just fine. But
>> after, no changes to the file fire the read event. So as a workaround,
>> just close the file and reopen? On second read the _Read() event in
>> fired immediately and continues to fire past the eof until the file is
>> again closed.
>>
>> Code to reproduce. Form with two buttons:
>>
>>
>> Gambas class file
>>
>> Private hFile As File
>>
>> Public Sub File_Read()
>>
>> Dim iByte As Byte
>> If Not Eof(hfile) Then
>> Read #hFile, iByte
>> Print "Got one byte: "; iByte
>> Else
>> Print Time()
>> End If
>> End
>>
>> Public Sub Button1_Click()
>>
>> Close hFile
>>
>> End
>>
>> Public Sub Button2_Click()
>>
>> hFile = Open "test" For Read Watch
>>
>> End
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
More information about the User
mailing list