Ace128 has asked for the wisdom of the Perl Monks concerning the following question:

Hey,

Just upgraded to v1.02 of the Win32::GUI from v1.00, and now when I run my app, I get some annoying error at the following:
$systray_menu = new Win32::GUI::Menu( "SystrayMenu Functions" => "SystrayMenu", "> Info" => "SystrayInfo", "> Exit" => "SystrayExit" ); sub SysTray_Click { my($x, $y) = Win32::GUI::GetCursorPos(); $mw_win32->TrackPopupMenu($systray_menu->{SystrayMenu}, $x, $y); # + <- Errorline 0; }
where it says:
Use of uninitialized value in subroutine entry at scipt.pl line ...
Use of uninitialized value in subroutine entry at scipt.pl line ...
Argument "*Win32::GUI::Window::Width" isn't numeric in subroutine entry at scipt.pl line ...
Wth is this? Worked before! Btw, the line the error is on is the line with the $mw_win32...
Edit: Now I also get:
Argument "*Win32::GUI::TrackPopupMenu" isn't numeric in subroutine entry at list script.pl line ...
Argument "" isn't numeric in subroutine entry at script.pl line ...
Argument "xpad" isn't numeric in subroutine entry at script.pl line ...
Argument "" isn't numeric in subroutine entry at script.pl line ...

All pointing at the same line.

UPDATE: Seems to be a bug (that is fixed now) in the module.

Thanks,
Ace

Replies are listed 'Best First'.
Re: System Tray problem (Win32::GUI) after upgrade to v1.02
by GrandFather (Saint) on Jul 20, 2005 at 09:54 UTC

    Use Data::Dumper, print or a debugger to take a look at the variables referenced in the line where the errors occur. It may be that one of the changes in the module is to use strict; use warnings; and that is showing up a problemt that was there before but wasn't manifest.


    Perl is Huffman encoded by design.
      I always use strict and warnings...