[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: property based C++ API with Lunar?
- From: Hakki Dogusan <dogusanh@...>
- Date: Wed, 12 Nov 2008 15:44:21 +0200
Ignacio Burgueño wrote:
Michael Bauroth wrote:
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 ?
Hope that helps.