[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: What type is "function" for tolua?
- From: "jose_marin2 <jose_marin2@...>" <jose_marin2@...>
- Date: Thu, 06 Feb 2003 13:34:01 -0000
Hi!
Consider the following cleaned class, in sample.pkg:
class Sample{
Sample();
~Sample();
void SetCallback( t_function f );// what type is correct to get a
Lua function pointer?
}
In Lua, I would like to do this:
function test()
...
end
sample = Sample:new()
sample:SetCallback(test)
That's the point! In C++, what type is "t_function"?
And how to store the address of the parameter (a function) in C++, to
call it later?
I know how to do all this in pure Lua, but using tolua (a great tool)
I don't know how!!!