give umenu with prefix a "title"

    Jul 16 2009 | 7:20 pm
    i'm using umenu to call up samples such as drums for examples. one umenu for kicks, one for snares, etc. each group is in a different folder. i have the menus populated but it gets confusing as to what umenu is for what so i want each one to display a title in the first slot. so for one umenu it'll say "snares" and then in the drop down will be "dry1.aif", "reverb1.aif" etc.
    could i have a umenu with just the "snares" as the menu text and then append the file names? i tried to do this with autopopulate on and it just erased the "snares" option. could i prepend "snares" on load to an autopopulated menu? i just see append and setitem options.

    • Jul 17 2009 | 5:29 pm
      you could not use autopopulate but only "append" for loading the filenames, then it is easy to make the item 0 something custom.
    • Jul 17 2009 | 6:20 pm
      i'm still confused how to append the list of files. an example patch would be of great help.
    • Jul 17 2009 | 9:54 pm
      here is one way:
    • Jul 17 2009 | 10:13 pm
      now i'm feeling foolish. i loaded a folder into the menu using the bang but it still just says "SNARES" only now the prefix inside inspector is set to the folder i chose. no files were added to the menu. is there a step i missed? i'm sorry for all the trouble.
    • Jul 17 2009 | 10:45 pm
      You will need to send the folder object a 'types' message with the type of file that you want to see. folder defaults to type TEXT.
      If you want to see all file types, you can just send the 'types' message without any typecode.
    • Jul 17 2009 | 10:56 pm
      ah! thank you! i'm not very experienced with the folder object so i forgot about the types message. problem sovled.