[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Identifying method calls on metatables
- From: "Luís Eduardo Jason Santos" <jasonsantos@...>
- Date: Thu, 24 Jul 2008 18:34:48 -0300
Hi,
Have anyone tried to determine, through a metatable, whether a given table key was called as a property or called as a method?
Something like:
t = setmetatable({}, my_mt)
print(t.a) -- one behaviour
print(t.a()) -- another behaviour
I have tried some ways, but all I could muster was this:
my_mt = {
}
Luís Eduardo Jason Santos