How to iterate through luabind class (in lua or in c++)?

classic Classic list List threaded Threaded
1 message Options
kFk
Reply | Threaded
Open this post in threaded view
|

How to iterate through luabind class (in lua or in c++)?

kFk

How to iterate through luabind class (in lua or in c++)?

class 'A'
function A:__init()
   
-- Does not work
   
-- self is userdata, not a table
   
for i, v in pairs(self) do
   
end
end

I've tried to use class_info(self).attributes.
But it retrieves only the attributes that are bound in c++ not the attributes that are created in lua.

Thanks


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user