lua-users home
lua-l archive

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


In Lua, I create a hierarchy of "objects" (Lua tables) that finally
represent a GUI widget hierarchy.

Now I want to somehow store C data in these objects, or link them with
such information.

E.g. I have to store the Widget pointer (a C lightuserdata value) for
each widget represented in the hierarchy.

What is a good way to do this?  My adventourous approach at the moment
is to create an additional table when an object is created, store my
values in this additional table and add it as metatable to the created
object...