lua-users home
lua-l archive

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


On 3/8/07, Leigh McRae <leigh.mcrae@cogeco.ca> wrote:
function SetIdiom(tb, v)
    tb = v
    return v
end

local sp = SetIdiom( self.spBackGround, W_TextRegion() )

This will not work.  tb is local to the function body; modifying it
does not modify the actual argument.

The following will work:

function set(t,k,v)
 t[k] = v
 return v
end

local sp = set( self, "spBackGround", W_TextRegion() )

     -Mark