<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AAPI_UIObject_GetName</id>
	<title>WoW:API UIObject GetName - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AAPI_UIObject_GetName"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UIObject_GetName&amp;action=history"/>
	<updated>2026-05-21T22:49:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:API_UIObject_GetName&amp;diff=756&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page API UIObject GetName to WoW:API UIObject GetName without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UIObject_GetName&amp;diff=756&amp;oldid=prev"/>
		<updated>2023-08-15T04:47:41Z</updated>

		<summary type="html">&lt;p&gt;Move page script moved page &lt;a href=&quot;/wiki/WoW:API_UIObject_GetName&quot; title=&quot;WoW:API UIObject GetName&quot;&gt;API UIObject GetName&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:API_UIObject_GetName&quot; title=&quot;WoW:API UIObject GetName&quot;&gt;API UIObject GetName&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:47, 15 August 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Move page script</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:API_UIObject_GetName&amp;diff=755&amp;oldid=prev</id>
		<title>Bear: Created page with &quot;{{widgetmethod}}  This function obtains the value of the current XML object. E.g. WorldFrame:GetName() returns &quot;WorldFrame&quot;.    local name = uiobject:GetName()  == Parameters...&quot;</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UIObject_GetName&amp;diff=755&amp;oldid=prev"/>
		<updated>2021-02-13T02:38:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{widgetmethod}}  This function obtains the value of the current XML object. E.g. WorldFrame:GetName() returns &amp;quot;WorldFrame&amp;quot;.    local name = uiobject:GetName()  == Parameters...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{widgetmethod}}&lt;br /&gt;
&lt;br /&gt;
Obtains the name of a Widget or other {{apiwidget|UIObject}}.&lt;br /&gt;
&lt;br /&gt;
 local name = uiobject:GetName()&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
=== Returns ===&lt;br /&gt;
* name (string) - the name of the UI object, or &amp;#039;nil&amp;#039; if no name&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Obtains the name of an object. Great for a lot of uses, like generic object handling functions.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
;Get the name of a default frame&lt;br /&gt;
 local name = PlayerFrame:GetName()&lt;br /&gt;
Result:&lt;br /&gt;
 name = &amp;quot;PlayerFrame&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;Create a frame in Lua with a name&lt;br /&gt;
 /dump CreateFrame(&amp;quot;Frame&amp;quot;, &amp;quot;MyFrame&amp;quot;):GetName()&lt;br /&gt;
Result:&lt;br /&gt;
 MyFrame&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
Frames and other elements created from XML with a &amp;#039;name&amp;#039; attribute will set the UIObjects name to the value in the &amp;#039;name&amp;#039; attribute when they are created, and add a global reference with the same name to the Lua object, like:&lt;br /&gt;
 &amp;lt;Frame name=&amp;quot;PlayerFrame&amp;quot;&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
 &amp;lt;/Frame&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Gets a default global reference:&lt;br /&gt;
 _G[playerFrame:GetName()] = playerFrame&lt;br /&gt;
&lt;br /&gt;
This is why &amp;#039;PlayerFrame&amp;#039; in the first [[#examples|example]] above has the same name as its global variable name, and why so many other default frames follow the same pattern.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Moved in patch 1.10.0 from {{apiwidget|Region:GetName}} to {{apiwidget|UIObject}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{xmlattr|name}} - XML name attribute&lt;br /&gt;
* {{xml|LayoutFrame}} - XML base frame type with name property&lt;/div&gt;</summary>
		<author><name>Bear</name></author>
	</entry>
</feed>