lua-users home
lua-l archive

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


Hi,

Ignacio Burgueño wrote:
Michael Bauroth wrote:
Hi,

can eventually someone point me to a short example for how to use __index and __newIndex (eventually in context Lunar) to access C++ methods like properties?


Attached is part of what I use. Take a look at the functions 'thunk_index', 'thunk_newindex' and the place were those are registered.

Basically, you when your table is indexed, you llok for a matching method and if none you look for a matching property. There are some files missing from my example, but you essentially, the code you'd want to rip is here.


Thanks for sharing your solution. Could you translate comments to English, please ?


[snip]

Hope that helps.

Regards,
Ignacio Burgueño




--
Regards,
Hakki Dogusan