How to make Window run cli, disable until command finish, then re-enable?

Dear all,

confused with the subject? me too

I plan to create my own gui for avg for Linux (on ver 8.5, they only
provide
cli)
my plan is, when I press button, it will run command line (plan to use
puts
some command here)
but when the command is running, my window must not be able to receive
input
until it finish
how can I achieve such behaviour?

Thank you
Regards
Hendra

Heya Hendra,

Take a look at this code, should do what you want:

[Taken from examples/dialogs/dialogs.rb]
WindowDisabler.disable(self) do
info = BusyInfo.busy(“Working, please wait…”, self) do

    for i in 0 ... 18
      Wx::get_app.yield()
    end
    sleep(2)
  end
end

wow, we got everything in example directory :slight_smile:
Thank you