Difference between revisions of "Getmetatable"
From GiderosMobile
|  (Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metata...") | |||
| Line 4: | Line 4: | ||
| If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object. | If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object. | ||
| <source lang="lua"> | <source lang="lua"> | ||
| − | (table) | + | (table) = getmetatable(object) | 
| </source> | </source> | ||
| − | '''object | + | '''object''': (object) Object from which to get metatable ''''''<br/> | 
| '''Returns''' (table) metatable<br/> | '''Returns''' (table) metatable<br/> | ||
Revision as of 10:17, 23 August 2018
Available since: Gideros 2011.6
Description
If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.
(table) = getmetatable(object)
'object: (object) Object from which to get metatable '
Returns (table) metatable
