Change my $mw = Win32::GUI ... To our $mw = Win32::GUI ... This will allow the timer subroutine to see the $mw object.
Steve Lloyd If the world didn't suck, we would probably all just fall off. http://www.basgetti.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 9:12 AM To: perl-win32-gui-users@lists.sourceforge.net Subject: [SPAM] - [perl-win32-gui-users] timer do not work - Email found in subject Здравствуйте, 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? use strict; use Win32::GUI; my $mw = Win32::GUI::Window->new(-size => [400, 400], -pos => [200, 200], -title => "FormsTest", -onTerminate => sub{return-1;}, ); $mw->AddTimer("CheckDir", 2000); $mw->Show; Win32::GUI::Dialog; sub CheckDir_Timer { $mw->Hide() if $mw->IsVisible(); $mw->Show() unless $mw->IsVisible(); return 1; } Thanks. -- С уважением, Сергей mailto:[EMAIL PROTECTED] ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users This email, and any files previous email messages included with it, may contain confidential and/or privileged material. If you are not the intended recipient please contact the sender and delete all copies.