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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user