Re: Userdata Environments
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Userdata Environments
- From: Rici Lake <lua@...>
- Date: 2007年2月13日 19:22:50 -0500
On 13-Feb-07, at 6:48 PM, Wesley Smith wrote:
I understand this is usally the case. But I want per-instance custom
behavior whereas the metatable is for class behavior. From the wiki
article:
"A userdata has both a metatable and an environment table. It seems
logical that the metatable contains information which is general to
the datatype of the userdata, while the environment table contains
information which is specific to the instance of the userdata."
What I don't undertand right now is how a userdata and its environment
table interact.
There's a more completely worked out example at
UserdataEnvironmentExamples