[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: :? syntactical sugar request
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 9 Apr 2001 15:50:28 -0300 (EST)
>> You could add an "index" tag method for this. Something like this:
>>
>> local NOP=function () end
>> settagmethod(tag(object),"index", function () return %NOP end)
>
>That works if you always want that behavior, but I'd like it to only
>return the nop function in particular cases.
If those "particular cases" depend on the table or index, then you can write
settagmethod(tag(object),"index", function (t,i) DO SOMETHING HERE end)
--lhf