Can't get filemenubar to delete a custom menu


I create a custom menu thus:

filemenubar "all",
    menu("Goodies") +

and then try to remove it with:

filemenubar "","","-Goodies"

as described in the filemenubar documentation. Nothing happens.


Each time you run filemenubar you are building menus from scratch. It’s not building on what was done before, in other words, it’s not cumulative. So all you need to do is:

filemenubar "all",""

The minus option is only for excluding standard menus, for example this would exclude the Action menu.

filemanubar "all -action"

Your code has another problem – you’ve specified an invalid menu bar in the third parameter. This parameter is for specifying what menu bar is being modified. Usually this parameter is omitted and the DATA_MENUBAR is implied, which is the main menu bar. You can also specify DATA_CONTEXTMENU or COLUMN_CONTEXTMENU to customize those context (right click) menus. You’ve specified -Goodies, which is not a legal menu bar, so I think your code is actually doing nothing at all (which is actually a good thing, because I think otherwise this code would have completely removed all of the menus, since you didn’t specify any).