in reply to Re: Menu Items & Modules...
in thread Menu Items & Modules...

So in each module I should replace:
if ($view){ $view->packForget; }
with:
($view) = grep{$_->name eq 'frame'} $$top->children; if ($view){ $view->packForget; }
...?

Replies are listed 'Best First'.
Re^3: Menu Items & Modules...
by TonyDonker (Novice) on Feb 21, 2005 at 12:03 UTC
    However: this doesn't work:
    sub messages_function { my $top = shift; @kids = $$top -> children; foreach (@kids) {print "Name: ", $_->name, "\n";} # if ($view) # { # $view->packForget; # } ($view) = grep{substr($_->name, 0, 5) eq 'frame'} $$top->children; if ($view){ $view->packForget; print "icit_messages: "; print $view; print "\n"; } $view = $$top->Frame(qw/-width 400 -height 400 -background white/) +->pack(); }