Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Perl version:use strict; use Win32::GUI (); $|=1; my $window = Win32::GUI::Window->new(); my $menu = new Win32::GUI::Menu( "mymenu" => "mymenu", " > foo" => "foo", " > bar" => { -name => 'bar', -onClick => \&bar_onclickcallback + }, ); print "Start Tracking\n"; $window->TrackPopupMenu($menu->{mymenu}, 20,20); print "Done Tracking, if it didn't print 'GOTCHA ...' then no callback +?\n"; sub bar_onclickcallback { print "GOTCHA bar\n"; return 1; } sub foo_Click { print "GOTCHA foo\n"; return 1; }
This is perl, v5.10.1 built for MSWin32-x86-multi-thread + (with 2 registered patches, see perl -V for more detail) + + Copyright 1987-2009, Larry Wall + + Binary build 1007 [291969] provided by ActiveState http://www.ActiveSt +ate.com Built Jan 26 2010 23:15:11
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::GUI Popup Menu no callback
by Anonymous Monk on Jun 28, 2010 at 03:32 UTC | |
|
Re: Win32::GUI Popup Menu no callback
by kejohm (Hermit) on Jun 28, 2010 at 08:47 UTC | |
by Anonymous Monk on Jun 28, 2010 at 10:05 UTC | |
by kejohm (Hermit) on Jun 28, 2010 at 11:58 UTC |