I’m trying to dynamically populate a menuitem on the main menubar called “Songbooks”. I am able to populate it but not to make the items selectable. I’ve done contextual menus and know that I can use this routine to create them. But on the main menubar, I’m not sure what to do. For one thing, I don’t know how to insert menu handlers dynamically … if it all.
Here’s the code:
f = SpecialFolder.Documents.Child("OpenSong").Child("Songs")
for folderCount = 1 to f.Count
f1 = f.Item(folderCount)
if f1.Directory then
FileItem = mid(FileItem,P+1)
SongbookMenu.Append (new MenuItem (FileItem) )
end if
next