[Gambas-user] Release of Gambas 3 RC3. But I have a dream.... BIS

Benoît Minisini gambas at ...1...
Sun Sep 18 23:24:43 CEST 2011


> Hello,
> 
> about your new suggestion:
> 
> 1) like I said, now I can open the fd in: /proc/self/fd/
> 
> e.g.: hFile = Open "/proc/self/fd/20" For read watch
> 
> some fd (like 3,4,5,6, 16 and 20) gives data, others not.
> 
> So, I don't understand what's the use of the trick.
> 
> 2) how have I to use it ?  maybe:
> 
> hFile = Open "/proc/self/fd/.1" For read watch
> 
> 3) I use Gambas 3, where can I download the revision #4134 ?
> 
> Thanks
> Paolo
> 
> 
> P.S.: Benoît ! Is not it better if you add that possibility to personalize
> the message loop ???
> 

Forget the "/proc/self/fd" thing. The new solution is the best I found without 
breaking compatibility. Maybe there will be another solution after Gambas 3.

I suggest you read the "subversion howto" on gambasdoc.org to learn how to use 
subversion to get the latest development release.

You ask how to use it. Did you read my mail? there is an example in it. For 
watching the file, just add the WATCH keyword. So:

	Dim iAlsaFileDescriptor As Integer
	Dim hFile As File

	hFile = Open "." & CStr(iAlsaFileDescriptor) For Read Watch

   ...

	Sub File_Read()
		' Get the data received through hFile
	End

To stop the watching, just close "hFile". The original ALSA file descriptor 
will not be closed.

Regards,

-- 
Benoît Minisini




More information about the User mailing list