[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lookup nil table index
- From: "Aaron Brown" <arundelo@...>
- Date: Thu, 30 Nov 2006 11:38:10 -0500
Roberto wrote:
You can achive this by setting an __index metamethod for
nil, but you will have to set it through C.
Or with the debug library:
Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
> debug.setmetatable(nil, {__index = function() return nil end})
> print(thing.foo.bar.this.that)
nil
--
Aaron
Beginning Lua Programming:
http://www.amazon.com/gp/product/0470069171/
http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=0470069171