lua-users home
lua-l archive

Chaning code at run time

[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
 end
 
 return { foo_update = foo_update }
end
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?
 

AltStyle によって変換されたページ (->オリジナル) /