lua-users home
lua-l archive

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


> However, this code doesn't seem to work:

> do
>   local cdoc
>   local docs
>   local function newindex(G,k,v)
>     docs[k]=cdoc

You need to initialize docs:
    local docs={}