I am using fxruby to create a dialog box which has few options. Here is the part where I display one option and what happens after clicking that one.
# Download file
dwd_file= FXButton.new(contents,
"&Download\tDownload file",
:opts => FRAME_RAISED|FRAME_THICK|LAYOUT_BOTTOM |LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,
:width => 150, :height => 50)
dwd_file.connect(SEL_COMMAND, method(:download))
def download(sender, sel, ptr)
# Doing something which will take time.
end
The dwd_file.connect will execute the download method which does somthing which takes time.
Question: The dialog box hangs around till that method is executed, how do we close it on clicking and later the method gets executed?
Thanks for any tip?