[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: __type for better typing
- From: Timm Felden <timm.felden@...>
- Date: Wed, 27 Sep 2006 12:27:33 +0200
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:)