[Gambas-user] Happy new year...
Benoît Minisini
gambas at ...1...
Fri Jan 2 02:05:27 CET 2015
Le 02/01/2015 01:49, Jussi Lahtinen a écrit :
>> Shell "echo test > " & sTemp Wait
>>
>> does not emit any event, as its underlying Process object has no event
>> name.
>>
>
> I still don't get it. I re-read the documentation and it says:
>
> If the WATCH keyword is specified, the file is watched by the interpreter
> via the select(2) system call :
> If at least one byte can be read from the file, then the event handler
> File_Read() is called.
> If at least one byte can be written into the file, then the event handler
> File_Write() is called.
>
>
> So, line:
> hWatchFile = Open sTemp For Read Watch
>
> Means file sTemp is watched for bytes to be read.
>
> And this writes "test" to the watched file:
> Shell "echo test > " & sTemp Wait
>
> And there is File_Read() event handler declared.
>
> Also this works as expected (/dev/zero has always zeroes for reading):
> hWatchFile = Open "/dev/zero" For Read Watch
>
> So, what exactly is missing the event name?
>
>
> Jussi
Sorry I didn't get the point. I will look at it.
By the way, it's a pity that you didn't separate all your tests so that
we could only run one of them.
Regards,
--
Benoît Minisini
More information about the User
mailing list