[Gambas-user] Release of Gambas 3 RC3. But I have a dream.... BIS
Benoît Minisini
gambas at ...1...
Sun Sep 18 17:43:13 CEST 2011
> ...I want to add that ALSA gives file descriptors by its functions..., but
> Gambas doesn't allows me to interact with message loop. I'ld need a
> "component" or "other" that allows me put in Gambas message loop these
> file descriptors. Gambas has to give the opportunity, possibility to
> personalize the message loop !!! So the developers could insert in it -
> generally - what they want ! GTK and QT, and probably others toolkits
> provide this possibility: to put in a "poll" on an arbitrary fd in the
> message loop ! Why ? Becose it's important.... I suppose. ;-)
>
> In my opinion this function is important ! ... isn't it ?
>
> bye
> Paolo
>
I may have a solution for you.
In revision #4134, I added a trick for opening existing file descriptors, so
that you can watch them.
The trick is the following: use ".XXX" as file name, where XXX is the file
descriptor number.
This trick only works if:
- You use the FOR READ/WRITE syntax.
- You don't use FOR CREATE/APPEND.
- XXX is a valid file descriptor.
- XXX has been opened for reading if you use FOR READ, and for writing if you
use FOR WRITE.
You can close the file, it will not close the file descriptor. But it will
stop the watching operations.
For example:
hFile = Open ".1" For Write
Print #hFile, "hello ";
Close #hFile
Print "world!"
Tell me if it works for you.
Regards,
--
Benoît Minisini
More information about the User
mailing list