A good menu tutorial?



I would like to create a dynamic menu when the application starts. I
have a directory structure like:

Courses/Name1
Courses/Name2

I would like Name1 and Name2 (and so on) to become sub-menus of the
Courses top level menu.

Courses
Name1
Name2

That way a user can create another directory and it will automatically
be added. Eventually I will have files in those directories that will
sub-menu names etc. So if you create a directory name of "Test" and add
files called "test1.txt" and "text2.txt" then the menu would look like:

Courses
Name1
Name2
Test
test1 # this will open the file into the application
test2 # ditto

I have the home of the script set like:

set home [file dirname [info script]]

So I guess I can do a foreach on "$home/Courses/" to get the dir names
and file names? I am not sure how to build a menu with that though.

Anyone done something like this?

Robert

.