i tried it, it works fine. i'm using activeperl 5.6.1.633 on windows 98 and win32::gui 0.0.665. the only problem i see is if you 'use strict' (which you should) you'd need to change $Win2 = new..... to my $Win2 otherwise you'll get an error about a global symbol requiring an explicit package name.
which versions of what are you using? it might be worth getting the latest ones. "Pascal Lagasse" <[EMAIL PROTECTED]> To: Sent by: <perl-win32-gui-users@lists.sourceforge.net> [EMAIL PROTECTED] cc: eforge.net Subject: [perl-win32-gui-users] Win32::GUI and Warnings 25/11/02 07:39 PM 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] ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users