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(); }