lua-users home
lua-l archive

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



* On 2006-11-30 Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote  :

> > 	a = thing.foo.bar.this.that
> > 
> > When one of the indicated elements does not exist, an error is generated
> > for apperent reasons: attempt to index nil value.
> 
> You can achive this by setting an __index metamethod for nil, but you
> will have to set it through C. (More exactly, you need C to set a
> metatable for nil. After that you can use Lua to set the metamethod.)

Yes, that works for me, thank you very much!

-- 
:wq
^X^Cy^K^X^C^C^C^C