lua-users home
lua-l archive

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


Hi,

   I've been working with tolua recently, and like it very much. There's 
   only one common action that I haven't been able to figure out how to
   do well with tolua: callbacks. I'd like to be able to pass a reference
   of a Lua function to a C++ method that calls the referred function at
   an arbitrary later time. Is there an easy way to do this? The only
   straightforward method i've been able to figure out thus far is to
   actually pass a string and then use lua_dostring(), but for efficiency
   reasons, i'd really prefer being able to use lua_callfunction().

   Any help would be appreciated.

Thanks,
_Ken (krawling@bluemarble.net)