G'day,

I found a piece of Code in the list.
Unfortunately, when I tried it, (although it works fine), I got warnings.

I am using always the switch -w (perl -w ... program name)

What I got  as warning is:

...
Use of uninitialized value in subroutine entry at wintest.pl line 54.
        (in cleanup) Can't call method "EXISTS" on an undefined value at
C:/Programme/Perl/site/lib/Win32/GUI.pm line 918 during global destruction.


The piece of Code that I found in the list is:
#----------------------------------------
use Win32::GUI;

my $i=0;

my $Win = new Win32::GUI::Window(
      -left   => 341,
      -top    => 218,
      -width  => 300,
      -height => 213,
      -name   => "Win",
      -text   => "Window Title"
      );



$Win->AddButton(
       -text    => "Loop",
       -name    => "Loop",
       -left    => 104.5,
       -top     => 102,
       -width   => 95,
       -height  => 28,
      );

$Win2 = new Win32::GUI::Window(
      -left   => 391,
      -top    => 238,
      -width  => 200,
      -height => 183,
      -name   => "Win2",
      -title   => "New Window",
      );

$Win2->AddLabel(
       -text    => "",
       -name    => "Label",
       -left    => 60,
       -top     => 30,
       -width   => 20,
       -height  => 20,
      );

$Win2->AddButton(
       -text    => "OK",
       -name    => "OK",
       -left    => 50,
       -top     => 102,
       -width   => 95,
       -height  => 28,
      );

$Win->Show();

Win32::GUI::Dialog();

sub Win_Terminate {
   return -1;
}

sub OK_Click {
   $Win2->Hide();
   $i++;
}

sub Loop_Click {
   &Show_Win2($i);

}

sub Show_Win2 {
   my $num = shift;

   $Win2->Label->Text($num);
   $Win2->Show();
   $Win2->Update();

}
#----------------------------------------

I did not found a FAQ, so I do not know what key-concepts I am missing.
I am not able to find what is wrong in the program.

Can someone help me! Thank you very much!


/Pascal Lagassé

Kösel GmbH & Co. KG - Über 400 Jahre Bücher mit System
Wartenseestraße 11 87435 Kempten
http://www.koeselbuch.de mailto:[EMAIL PROTECTED]



Reply via email to