lua-users home
lua-l archive

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


Michael Cumming wrote:
I am assuming there is no way to directly pass a reference to a function
and then store that for later.

You're assuming wrongly. :)

You can copy the parameter corresponding to the function, into
the registry.  You get an integer handle from that, can pass
it around, and then eventually use that handle to copy that
function onto the Lua stack and run it when you need do.

--Adam
--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3