Hi All,

Can any one tell me if the Timer method has changed with the NEM. I have a
app where I would like to display the main GUI then have a script run after
a 3 sec delay, to allow the GUI to display. The script would send text to
the Status bar depending on what conditions it finds. I have had to use the
NEM on the buttons as they are determined from a config file and I needed a
generic handler.
see post from Laurent ROCHER Re: How to define generic handler for buttons 
2003-05-26 07:11 
I cannot get the timer to trigger though.
Can any one help
Here is a sample of some of the script.

############################################
#!perl -w

use Win32::GUI;
use strict;
my ($Sb);

my $winHeight = 100;
my $main = Win32::GUI::Window->new(
        -name => 'Main',
        -width => 300,
        -height => $winHeight,
        -text => "  Main Form",
          -minsize => [300,$winHeight],
          -maxsize => [300,$winHeight],
          );

addActionButtons();
addStatusBar();

$main->AddTimer("T1",3000);
$main->Show();
Win32::GUI::Dialog();

sub addActionButtons
{

my $butTop = ($winHeight - 90);
my $Button_Run = $main-> AddButton(
                -name => "Button_Run",
                -text => "Run",
    -events => {Click => \&Button_Run_Click },
                -default => 1,
                -size => [100,40],
                -left => 20,
                -top => $butTop,
    );
}
sub addStatusBar
{
  $Sb = $main->AddStatusBar();
}
sub Button_Run_Click
{
  $Sb->Text("Run Button Clicked");
}
sub T1_Timer
{
  $Sb->Text("Timer went Off");
}
sub Main_Terminate
{
  -1;
}

#####################################################3
any help would be greatly appreciated.

Regards
Ross Clunie




Reply via email to