lua-users home
lua-l archive

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


Hey all,

I'm incredibly impressed so far with how flexible lua has been while
integrating it into my app.  I never thought it would allow me to to massage
it so that it would absolutely, perfectly fit MY design goals and visions
and not force me to change for it.  Very remarkable that it has.

However, I think I've finally encountered something that isn't feaseable!

Or it could be my spacey brain can't conceive of how do to do so after a 14
hr work day. :)

Anyway...

I have a table (obviously a metatable that implements simple inheritance):

{
    __index = function(table, key)
        return  rawget(XMethods, key) or
                rawget(YMethods, key) or
                rawget(ZMethods, key) end
}

Now, is there a way (from C code) to traverse the table to extract out the
strings "XMethods", "YMethods" and "ZMethods" (without having to resort to
parsing the Lua source code)?

I'm hoping to implement an object inspector that will take and object and
digest it's metatable and display in a UI the contents of the "inherited"
tables, etc...

Have I finally hit my lua limit of possibility?  Or will Lua again amaze me
with it's flexible capabilities?!?!  Tune in next week to find out!

Thx,
Ando

-----------------
SpriTec Software
www.spritec.com