[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Calling anonymous functions from C
- From: Rolf Meyerhoff <rm@...>
- Date: Sat, 20 Aug 2005 07:45:11 +0200
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