Wikia

WoWWiki

Changes: XML/Attributes

Edit

Back to page

Line 1: Line 1:
{{uixml}}
+
{{uixmlprop}}
   
 
[[XML/Attributes|Attributes]] holds a list of [[XML/Attribute|Attribute]] elements, and is a mechanism for adding members to Lua objects that representthe UI element. [[XML/Attributes|Attributes]] can be defined in any [[XML/Frame|Frame]] type.
 
[[XML/Attributes|Attributes]] holds a list of [[XML/Attribute|Attribute]] elements, and is a mechanism for adding members to Lua objects that representthe UI element. [[XML/Attributes|Attributes]] can be defined in any [[XML/Frame|Frame]] type.

Revision as of 20:01, September 23, 2012

XML UI ← XML properties < Attributes

Attributes holds a list of Attribute elements, and is a mechanism for adding members to Lua objects that representthe UI element. Attributes can be defined in any Frame type.

Inheritance

Inherited by: none, Inherits: none, Defined in: Frame

Elements

<Attribute> ...

Attributes

none

Summary

Attributes allow XML to define Lua variables for the runtime UI object representing the element. Defining an attribute will actually set a member of the elements object table of the defined type. UI the default WoW UI FrameXML Attributes are often used to define security attributes as setting those attribes before the frame is available, insures that the element is secured before any other scripts can access it.

Example

<Frame name="MyFrame">
  <Attributes>
    <Attribute name="myvar" type="number" value="0"/>
  </Attributes>
</Frame>

This example will set a variable named 'myvar' with a number value of '0', when the frame is created.

Around Wikia's network

Random Wiki