Subject: | toolbar embedded in another toolbar cannot be destroyed |
when one embeds a toolbar in another, and then destroy the embedded
toolbar, the tollbar get destroyed but remains visible. and when
clicking on the (phantom) button, there's a crash since button has been
destroyed...
#!/usr/bin/perl
use 5.010;
use strict;
use warnings;
use Tk;
use Tk::ToolBar;
my $mw = MainWindow->new;
my $tb = $mw->ToolBar(-movable=>0, -side=>'top');
$tb->ToolButton(-text=>'Button',-command => sub { $tb->destroy });
my $tbin = $mw->ToolBar(-movable=>0, -in=>$tb);
$tbin->ToolButton(-text=>'close',-command => sub { $tbin->destroy });
MainLoop;