On Wednesday, April 17, 2002, at 02:09 , richard noel fell wrote:
> sub create_menu_bar > { > my $mb = $MW->Menu(); > $MW->configure(-menu=>$mb); > opendir DIR, "./" or die " cannot open current directory: $!"; > my $current_directory = cwd; > my @directories = grep { !/^\.\.?$/ && -d "$current_directory/$_" } > readdir DIR; > map {$mb->cascade(-label => '~'.$_, -menuitems=>\&sub_menu($_))} > @directories; One of the problems I have is that I do not have the TK package and have had only a limited amount of time to do the CPAN read and heed on this, so the question seems to be down to the method 'cascade' and what it is expecting to have returned to it with the -menuitems. so if it is expecting to see the list qw/cascade , ~/foo , cascade, ~/bar , .... /; then map {( 'cascade', '~'.$_)} @sub_directories; would seem to be the right answer.... but it is not clear to me that -menuitems=>\&sub_menu($_) would actually 'invoke' the sub_menu function and 'fill in' what will be needed - rather that it sends the reference to the function to be invoked.. ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]