[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to know calling convention inside __index function
- From: PA <petite.abeille@...>
- Date: Wed, 30 May 2007 22:13:39 +0200
On May 30, 2007, at 22:04, John Labenski wrote:
I am most interested in knowing the difference between
udata.GetStuff <==> udata:GetStuff()
udata.SetStuff = 5 <==> udata:SetStuff(5)
Not sure how this directly relate to userdata, but in plain Lua you
will have two different metamethods:
self.GetStuff -> self[ 'GetStuff' ] -> self.__index( self, aKey )
self.SetStuff = 5 -> self[ 'SetStuff' ] = 5 -> self.__newindex( self,
aKey, aValue )