Fandom

WoWWiki

XML/Attribute

< XML

104,634pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

XML UI ← XML properties < Attribute

The WoW XML Attribute elements add an arbitrary variable to a runtime Lua object. This mechanism is very akin to the parentKey, relativeKey, and targetKey XML attributes, in that all of these allow adding arbitrary member variables to Lua objects from WoW FrameXML. See also KeyValue.

Inheritance Edit

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

Elements Edit

none

Attributes Edit

  • name (string) - Lua name for the attribute
  • type (ATTRIBUTETYPE) - the Lua type for the attribute. Default is 'string'.
  • value - the actual value for the attribute. will be converted to the Lua type defined by type at runtime

Summary Edit

An Attribute element defines a Lua runtime object variable for the XML element.

Example Edit

<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.

Also on Fandom

Random Wiki