lua-users home
lua-l archive

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


On Mon, Dec 18, 2000 at 05:23:46PM -0800, Falko Poiker wrote:
> 4. lua calls the function in this manner: function(this, param1, param2...)
> 
> How can I do this?  Can I somehow push the myClassInstance back onto the
> stack so that when lua calls the function all is well?  

1. You can make the function you return a closure including the userdata
information.
2. Call the function as myClassInstance:membfunc(param1,param2) which adds
the implicit 'self' parameter to the parameter list (IIRC)

Regards,

Daniel