[fxruby-users] adding text to a running FXApp

Lyle Johnson lyle.johnson at gmail.com
Wed Jun 6 10:05:04 EDT 2007

On 5/29/07, Tom <tl2001 at pacbell.net> wrote:

> I am trying to write my first Ruby FX App.
> I have modified the Babel example to so what I want.
> I can append the text in the bottom window by pushing
> the button. My app downloads data from a server and
> need to do many calculation on it and then display the
> results.
> I was hoping you can show me how to do this operation.
> Remember the data can come at any time so it
> needs to be asyncronous of any event.
> Here's the modified babel program.
> The Thread didn't work as expected!

Sorry for the delayed response, this one slipped through the cracks.

Once you call FXApp#run, the application enters the event loop
(waiting for events) and doesn't return until the application exits.
So in your example, the thread doesn't even get created until the
application is done and returns from run().

Take a look at the groupbox.rb example program in the FXRuby
distribution; that one creates a thread and it should give you a frame
of reference for how to get it working in your program.

Hope this helps,


More information about the fxruby-users mailing list