I am facing the same problem in several places in my application where I am using a menu bound to an hlist.
I do not understand the proposed solution and how scoping plays a part
In my application I am assigning the menu object to a hash element so that I can refer to it and try to destroy it when the window is going to close. like this:
$winInfoRef->{MENU}= $winInfoRef->{HLIST}->Menu(-tearoff=>1,
I have recreated the problem with the originally posted example code, I changed the lines to make $pop_menu a global as suggested (and relisted below)
#~ my $pop_menu = $frame->Menu( -menuitems => our $pop_menu ; $pop_menu ||= $frame->Menu( -menuitems =>
but I still get the same error:
Tk::Error: window ".toplevel.frame.hlist.menu" was deleted before its +visibility changed at C:/Perl/site/lib/Tk/Widget.pm line 1000. Tk callback for tkwait <Button-1> (command bound to event)
Thomas said he withdrew his menu, but I tried that too with no success(maybe I don't know how) Can anyone share more insight into this error?
In reply to Re^3: Why does widget->destroy give the error Tk::Error widget was deleted before its visibility changed?
by boleary
in thread Why does widget->destroy give the error Tk::Error widget was deleted before its visibility changed?
by thomas.bystrom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |