merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
Sadly this fails with the message Can't call method "attach" on an undefined value at line nn. This is the line where I try to attach the balloon to the pull down menu. Without this line the pull down menu can be seen.use Tk; use Tk::Balloon; use strict "vars"; my ($mw); my (%tooltip_mes, %tooltip_status_mes, %balloon_wg, %wg, @local_option +s, @mes_options, @sta_options, $option_res); $mw = MainWindow->new(-title => "Simple example"); $local_options[0] = 'Option 1'; $local_options[1] = 'Option 2'; $local_options[2] = 'Option 3'; $local_options[3] = 'Option 4'; $mes_options[0] = "tooltip 1/nOption A"; $mes_options[1] = "tooltip 2/nOption B"; $mes_options[2] = "tooltip 3/nOption C"; $mes_options[3] = "tooltip 4/nOption D"; $wg{APullDown_Option} = $mw->Optionmenu( -textvariable => \$option_res, -state => 'normal', -options => [@local_options])->pack; # line that fails $balloon_wg{pulldown}->attach($wg{APullDown_Option}, -msg => [@mes_opt +ions]); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Balloon and menus options
by almut (Canon) on Dec 07, 2009 at 13:11 UTC | |
by merrymonk (Hermit) on Dec 07, 2009 at 14:07 UTC | |
by almut (Canon) on Dec 07, 2009 at 16:44 UTC | |
by Anonymous Monk on Dec 07, 2009 at 17:05 UTC | |
by merrymonk (Hermit) on Dec 07, 2009 at 18:44 UTC | |
| |
by zentara (Cardinal) on Dec 07, 2009 at 15:55 UTC | |
by merrymonk (Hermit) on Dec 07, 2009 at 17:01 UTC | |
by zentara (Cardinal) on Dec 08, 2009 at 13:01 UTC | |
by Anonymous Monk on Dec 07, 2009 at 16:26 UTC | |
by almut (Canon) on Dec 07, 2009 at 17:03 UTC | |
|
Re: Balloon and menus options
by Anonymous Monk on Dec 07, 2009 at 13:11 UTC |