On Thu, Jun 25, 2009 at 02:48:57PM +0200, Julien Danjou wrote:
> [...]
> > +    for _, k in ipairs(util.table.ikeys(widgets)) do
> 
> I did not dig too far, but isn'y ipairs enough?
> 
> [...]

Nope, because ipairs stops when it encounters a nil value. The following
table would be iterated over completely:

{
    foo,
    bar,
    asdf
}

While the following would only iterate over the first two values:

{
    foo,
    bar,
    nil,
    asdf
}

-- 
GCS/IT/M d- s+:- a--- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o--
K- w--- O M-- V PS+ PE- Y+ PGP+++ t+ 5 X+ R tv+ b++ DI+++ D+++ G+
e- h! r y+

    Gregor Best

Attachment: pgpK092ex4ZVT.pgp
Description: PGP signature

Reply via email to