On Tue, Mar 16, 2004 at 11:12:57PM +0100, Frank Ehmsen wrote:
> I try to include a file with a menu definition every time the menu is
> displayed. I have tried this in ion-bindings.lua:
> 
>     kpress(SECOND_MOD..KEYF12, function()
>                                 include("menu_applications")
>                                 make_bigmenu("mainmenu")
>                         end),

You're not calling the function created by make_bigmenu_fn
                                                       ^^^
function(reg, sub) 
    include("menu_applications") 
    make_bigmenu_fn("mainmenu")(reg, sub)
end

might do it.

However, I consider it bad practise to load a file always when a 
function is called and would suggest going another (undocumented) 
route.

defmenu("mainmenu", generate_mainmenu)

where generate_mainmenu is a function that constructs a menu table like the
ones you would pass to defmenu normally. See windowlist and workspacelist in
menulib.lua for examples.

-- 
Tuomo

Reply via email to