[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Direct access to key/value table items?
- From: Ando Sonenblick <ando@...>
- Date: Sat, 09 Aug 2003 16:04:00 -0700
Gang,
I've got many a table like this:
t = {
a = function() ... end,
b = function() ... end
}
I know need to get an indexed function name from the table. For index 1, I
need back "a", index 2, "b" and so on.
This can be done with foreach, but is there no way in lua to directly access
a specific item?
Such as:
print(t[1].key) ????
Thx,
Ando
-----------------
SpriTec Software
www.spritec.com