in reply to Re: Creating a non-UI event in Perl/Tk
in thread Creating a non-UI event in Perl/Tk

No, that isn't the issue. It's starting the process. MainLoop causes the window to be displayed, with all the widgets. If I create a Button widget and give it a -command => \&main_logic, then everything works when the user presses the button. ProgressBar updates work just fine with ->update or ->idletasks.

The issue is that I don't want someone to have to press a button to call main_logic(). I want the window to display and main_logic() to be called automagically immediately thereafter.

--
$me = rand($hacker{perl});

All code, unless otherwise noted, is untested
"All it will give you though, are headaches after headaches as it misinterprets your instructions in the most innovative yet useless ways." - Maypole and I - Tales from the Frontier of a Relationship (by Corion)
  • Comment on Re^2: Creating a non-UI event in Perl/Tk