lua-users home
lua-l archive

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

I've got a quick tag method question. If I've got the "index" tag method set
for a table (say "foo"), I can get a function called whenever someone writes


and member is nil. I can then dispatch this call based on knowledge of the
index name (in this case the string "member").

However, for the case of foo.member(bar) (or foo:member(bar)), what is the
correct way to intercept this call? It seems to me that I lose the
information that "someone tried to call function 'member' on table 'foo'" if
I use the function tag method.

What is the 'correct' lua way to handle this case?