Hello everybody,
I'm currently using SWIG 2.0 to allow various classes of my application to be accessible from Lua.
Everything is working fine, and really, SWIG is a GREAT tool but ... i'm facing a problem:
I have a swiged class "CMyClass".
And i want to call a lua function let's say:
function OnPostInfoRequest( myclass )
print( myclass.AFunctionOfCMyClass() )
end
At first i thought it would be enought to use lua_pushlightuserdata and to call the OnPostInfoRequest(), but apparently that's not the case.
If i just do that, when the statement myclass.AFunctionOfCMyClass() is executed, i have a lua error that say that myclass does not have any metatable associated ...
Does anybody know how to achieve that ?
Should i use the SWIG_lua function [font=monospace][size=2]SWIG_NewPointerObj ?[/font]
[font=monospace][size=2]
[/font]
[font=monospace][size=2]Any help is welcome !![/font]
[font=monospace][size=2]
[/font]
[font=monospace][size=2]Thanks![/font]
Call lua function with "Swiged" parameter... How to ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement