lua-users home
lua-l archive

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


On 1/28/08, Dan <balaam@gmail.com> wrote:
> I want to remove the coroutines that are dead in this dictionary. K is

the 'correct' way would be to replace "v=nil" with
"effectsTable[widgetTableIndex][k]=nil". IOW, replace with nil the
table entry itself, not the value you got from pairs().

please read pairs() and next() paragraphs in the docs about modifying
the table while traversing it.  specifically clearing fields is
allowed, but be careful not to add new values.

-- 
Javier