lua-users home
lua-l archive

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


On 8 October 2012 00:40, Rob Hoelz <rob@hoelz.ro> wrote:
> Typical is *really* simple; on Lua values without a metatable, it just
> calls _G.type.  If the value has a metatable, it checks for a __type
> field in the metatable and uses that if found.

This is actually very nice. It will already work for lqt, because
every type metatable has a __type field, so for example:

o = QObject()
print(o.__type) --> QObject*