Re: protecting a variable
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: protecting a variable
- From: "Alex Queiroz" <asandroq@...>
- Date: 2006年3月14日 13:13:10 -0300
Hallo,
On 3/14/06, Noel Frankinet <nfr@gistek.net> wrote:
> Hello,
> Is there a way to protect a variable like in tcl ("trace") ?
> That is, how to call c or lua code whenever a lua variable is accessed
> (read or write).
If the variable is global you can use the __index and __newindex
metamethods, for each global variable belongs to a table (_G in the
most common case).
--
-alex
http://www.ventonegro.org/