lua-users home
lua-l archive

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


Hi,

I'm currently adding scripting support to my application. To implement
callbacks I call lua script functions via the lua_getglobal() -
lua_push*() - lua_pcall() sequence, so the script has to pass the
function name to my application via "__newindex" (eg. appObject.callback
= "luaFunc"). This works fine but is really not very "luaish".

I'd rather use the functions directly, eg.:

appObject.callback = function(param) ...

Somebodys got an idea how to implement this (5.0)? Can this be done?

Regards

Rolf Meyerhoff