lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



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 )