Difference between revisions of "Object"
From GiderosMobile
|  (remove language stuff) | |||
| Line 1: | Line 1: | ||
| __NOTOC__ | __NOTOC__ | ||
| − | |||
| <!-- GIDEROSOBJ:Object --> | <!-- GIDEROSOBJ:Object --> | ||
| − | ''' | + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> | 
| − | ''' | + | '''Available since:''' Gideros 2015.08<br/> | 
| − | ===  | + | === Description === | 
| Main Object class from which all Gideros classes inherit. | Main Object class from which all Gideros classes inherit. | ||
| There is no other purpose for this class, rather a neat way to add methods to all Gideros classes. | There is no other purpose for this class, rather a neat way to add methods to all Gideros classes. | ||
| − | ===  | + | === Examples === | 
| <source lang="lua"> | <source lang="lua"> | ||
| local bmp = Bitmap.new("image.png") | local bmp = Bitmap.new("image.png") | ||
| Line 24: | Line 23: | ||
| {|- | {|- | ||
| | style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
| − | ===  | + | === Methods === | 
| − | [[ | + | [[Object:getBaseClass]] ''returns base class''<br/><!--GIDEROSMTD:Object:getBaseClass() returns base class--> | 
| − | [[ | + | [[Object:getClass]] ''returns class name''<br/><!--GIDEROSMTD:Object:getClass() returns class name--> | 
| − | [[ | + | [[Object:isInstanceOf]] ''checks if instance belongs to class''<br/><!--GIDEROSMTD:Object:isInstanceOf(classname) checks if instance belongs to class--> | 
| | style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
| − | ===  | + | === Events === | 
| − | ===  | + | === Constants === | 
| |} | |} | ||
| {{GIDEROS IMPORTANT LINKS}} | {{GIDEROS IMPORTANT LINKS}} | ||
Revision as of 09:22, 31 December 2020
Supported platforms: 






Available since: Gideros 2015.08
Description
Main Object class from which all Gideros classes inherit.
There is no other purpose for this class, rather a neat way to add methods to all Gideros classes.
Examples
local bmp = Bitmap.new("image.png")
print(bmp:getClass()) -- prints Bitmap
print(bmp:getBaseClass()) -- prints Sprite
print(bmp:isInstanceOf("Bitmap")) -- prints true
print(bmp:isInstanceOf("Sprite")) -- prints true
print(bmp:isInstanceOf("EventDispatcher")) -- prints true
print(bmp:isInstanceOf("Object")) -- prints true
print(bmp:isInstanceOf("TileMap")) -- prints false
| MethodsObject:getBaseClass returns base class | EventsConstants | 
