in reply to Tkx and WIN32::FileOP
The problem is that the FileOp dialogs enter their own event loops, which means that Tk's event loop doesn't get serviced until the dialog completes. One way to prevent that would be to run the dialog in a thread and use DoOneEvent() in a loop until the dialog completes.
Where you currently do:
my $filename = OpenGialog( ... );
You need to use something like this, though you'll need to look up the details yourself:
use threads; use threads::shared; ... my $filename :shared; async { $filename = OpenDialog( ... ); }->detach; DoOneEvent( 1 ) until $filename; ## use $filename
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tkx and WIN32::FileOP
by conversecorollary (Novice) on May 27, 2011 at 23:23 UTC | |
by BrowserUk (Patriarch) on May 27, 2011 at 23:38 UTC | |
by conversecorollary (Novice) on May 28, 2011 at 01:33 UTC |