|
I am very new to FXruby so this may be a simple question (I
hope). I have a ruby script I wrote to do system maintenance (backup, clean
files, etc) on Windows. I wanted to add a small popup FXruby window to show
what was happening and perhaps warn before rebooting, etc.
Q1: I hit on the idea of having my main script start the FXruby program
as a separate process and use stdout/stdin to tell the window what
text to display - is this a reasonable approach?
Q2: When I add the addInput code (below) I can run the FXruby window program
from a command prompt and type in text and it updates; however, the window also
displays the hourglass icon when the mouse pointer is over it and it blocks
using the window cancel button (upper right X) to close it. Am I doing
something wrong in my code that blocks the "close" event and causes
the hourglass?
def onInputData( sender, sel, ptr)
msg.text = $stdin.gets
app.refresh
end
app.addInput($stdin, INPUT_READ, method(:onInputData))
Thanks
Dave McDonald
|