Original Post
I'm using lua and luabind to link my C++ classes/methods to lua mainly for GUI creation similar to world of warcraft's but I ran into one think I can't figure out, how can I have a lua function as a parameter in a C++ method. An example in lua would be: local Frame = CreateFrame("Frame", nil); Frame:SetScript("OnMouseDown", function() print("print me!"); end); What would SetScript look like in C++? Currently I have it as SetScript(string foo1, const char* foo2) and I put the second parameter in quotes in lua so I could do luaL_dostring but it's time for me to fix this. Would anyone know what I could do to make this possible?