WoW:API Region GetName: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
({{widgetmethod}})
m (Move page script moved page API Region GetName to API Region GetName without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod|removed=1.10.0|replace=Moved to {{apiwidget|UIObject:GetName}}}}
 
<center>'''GetName''' ''-Documentation by [[user:AlexanderYoshi|Alex]]-''</center>


This function obtains the value of the current XML object. E.g. WorldFrame:GetName() returns "WorldFrame".  
This function obtains the value of the current XML object. E.g. WorldFrame:GetName() returns "WorldFrame".  


  object:GetName()
  local name = region:GetName()


----
== Parameters ==
;''Arguments''
=== Returns ===
* name (string) - containing the name of the object


:''none''
== Example ==
 
----
;''Returns''
 
:name
:;name : String containing the name of the object
 
----
;''Example''
  local name = PlayerFrame:GetName()
  local name = PlayerFrame:GetName()


;''Result''
;Result
  name = "PlayerFrame"
  name = "PlayerFrame"
----
;''Description''


: Obtains the XML name of an object. Great for a lot of uses, like generic object handling functions.
== Details ==
Obtains the XML name of an object. Great for a lot of uses, like generic object handling functions.
 
== Notes ==
* Moved in patch 1.10.0 from {{apiwidget|Region}} to {{apiwidget|UIObject:GetName}}

Latest revision as of 04:47, 15 August 2023

Widget API ← Region < GetName

This function obtains the value of the current XML object. E.g. WorldFrame:GetName() returns "WorldFrame".

local name = region:GetName()

Parameters[edit]

Returns[edit]

  • name (string) - containing the name of the object

Example[edit]

local name = PlayerFrame:GetName()
Result
name = "PlayerFrame"

Details[edit]

Obtains the XML name of an object. Great for a lot of uses, like generic object handling functions.

Notes[edit]