lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I would like to be able to change the following lua function at run time:

function new_foo()
    local foo_update = function()
    -- do something
    return { foo_update = foo_update }

foo.foo_update() -- foo was created during initialization 

Is there any way to change foo_update during run time? If not, then is there another way to create objects which allows me to change them at run time?