Getmetatable: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 6: Line 6:
(table) = getmetatable(object)
(table) = getmetatable(object)
</source>
</source>
'''object''': (object) Object from which to get metatable ''''''<br/>
=== Parameters ===
'''object''': (object) Object from which to get metatable <br/>
=== Return values ===
'''Returns''' (table) metatable<br/>
'''Returns''' (table) metatable<br/>

Revision as of 09:44, 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)

Parameters

object: (object) Object from which to get metatable

Return values

Returns (table) metatable