[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Extending C++ classes under Lua
- From: Don Hopkins <dhopkins@...>
- Date: Mon, 18 Sep 2006 17:57:09 -0700
How does the "__getitem" and "__setitem" magic stuff in
SWIG_Lua_class_get and SWIG_Lua_class_set work?
It delegates to a function in the metatable called __getitem and
__setitem, but I'm not sure how to set these up, or get a reference to
the metatable from lua to poke my function in there.
I think the __getitem hook would be useful to delegate unknown
attributes to a lua peer object (stored in the environment of the
userdata).
-Don