Re: Is PTK a dead end? Or [ UpdateWrapper woes ]
Todd Littlefield <[email protected]> Wed, 31 Oct 2007 21:02:37 -0400
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Hmmm... You could try giving the main window focus after the
de-iconify. It could be
that Windows simply doesn't switch focus from the active application to
the Tk
app once it is de-iconified. Maybe forcing it with
$mw->deiconify;
$mw->focus;
The other option might be to set the focusmodel to be active.
$mw->focusmodel( 'active' ) ;
will do the trick. That might have unintended consequences though. The
docs
say that this will claim focus even if it is currently in another
application. That
sounds like your app would be in a modal state for the entire machine...
Michael Higgins wrote:
>
> Well, the only workaround to the UpdateWrapper errors was to 'after, 500 $mw-> a widget that fails to pack. Do I know what that does? Not really. Seems like a timing hack.
>
> #$mw->deiconify; Works, but something steals focus from the app
>
> $mw->after(500,sub{$mw->deiconify}) Works, focus stays with the app
>
> The first code doesn't "dwim", or seem to work as intended. Why the second method does is the question.
>
>
--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/ptk