10-24-2016, 06:27 AM
Your constructor param checking is wrong.
In function tolua_cTestclass_new, you're checking if the first parameter is an instance of a cTestclass. Of course it can't be, it's the class table itself, so you need to use L.CheckParamUserTable(...) instead of L.CheckparamUserType(...).
See the manual binding for cLuaWindow's constructor for inspiration.
In function tolua_cTestclass_new, you're checking if the first parameter is an instance of a cTestclass. Of course it can't be, it's the class table itself, so you need to use L.CheckParamUserTable(...) instead of L.CheckparamUserType(...).
See the manual binding for cLuaWindow's constructor for inspiration.