From: Lyle Johnson Date: 2002-08-27T00:39:58+09:00 Subject: Re: FXRuby + select on popen() in windows Vardhan Varma wrote: > Well subject says it all ... > In Windows, i need to popen(..,"rw") a couple of programs, open a couple of > tcp/sockets and display using FOX ... how do i do it .... > Do i have to threaden the application ... > Is the IO.select() merged with FOX.mainloop ? You can certainly do this with the C++ version of FOX, using FXApp::addInput(). Under Unix you pass the file descriptor for your file, pipe, socket, etc. to addInput() to indicate that you'd like to be notified of asynchronous events that occur on this file. Similarly, under Windows you pass a kernel object HANDLE corresponding to the file/socket of interest. This has been implemented in FXRuby too, but I honestly haven't used it enough to know how well it will work under Windows. One of the examples included in the FXRuby source distribution ("inputs.rb") should give you an idea of how to get started. If you do run into trouble and can send me a short example program we can probably get it to work.