RE: [perl-win32-gui-users] timer do not work

2005-08-03 Thread Peter Eisengrein
 Здравствуйте, perl-win32-gui-users,
   I wrote simple script with timer. It's supposed that timer
   hides/shows main window but window is always visible. What's the
   matter?


Your if() logic in CheckDir_Timer sub. If you look closely, you will see
that the window gets hidden and then shown again immediately after. You tell
it to Hide if visible and immediately after you tell it to show if it is
not. Try this one instead:

sub CheckDir_Timer {
if ($mw-IsVisible())
{
$mw-Hide();
}
else
{
$mw-Show();
}
return 1;
}

 sub CheckDir_Timer {
 $mw-Hide() if $mw-IsVisible();
 $mw-Show() unless $mw-IsVisible();
 return 1;
 }



Re:[perl-win32-gui-users] timer do not work

2005-08-03 Thread Robert May

Сергей Черниенко wrote:


But! Timer do not work as
before though I declared $mw as our (not my) (Steve Lloyd advice) and
corrected event handler. It's like that handler not executed at all.
I have Win32-GUI 1.02, perl 5.8.6 and Windows98SE


It works fine here using lexical variables, Win98SE, perl 5.8.7 and 
5.6.1, Win98SE


Do you have an example of it not working that you can share?

Regards,
Rob.