lua-users home
lua-l archive

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

Is there any *good* way to get the type of a table or userdata. I'm thinking of types like "Vector" or "Sprite" or something else, that I am using internally. Currently I'm using typechecking with the REGISTRYINDEX but I it doesn't work with my new OOP System. So I came up with the idea to add an __type field to the metatable but this would mean to me, that I have to implement a new gettype function. Maybe someone has a better idea:)