On Fri, Jul 18, 2008 at 01:40:28PM +0200, François Vaux wrote:
> My program's display isn't refereshed until the button's task is
> complete. is this the way it is supposed to work? or is there a way to
> get a 'status' during a button press? I have a pastie with a simple
> app to demonstrate my problem.

Yes, since the GUI and Ruby presently occupy the same threadspace,
you'll need to use a Ruby thread to run long background tasks like
this. 

However, I've been spending the last few days writing a threaded
HTTP class designed just for this case.  (Sort of like
XMLHttpRequest for the browser, I guess.)  Since your script is
threading its download, you should be able to benefit from this
work in a few days.

_why

Reply via email to