Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:XML/LayoutFrame
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Keys === Setting 'parentKey' or 'parentArray' will add a named Lua variable referencing this object to its parent object at runtime. Both can be used at the same time. Setting 'parentArray' will add this object to a named array in its parent, and setting 'parentKey' will create a simple Lua member to this object in the parent with that name. For 'parentKey' conflicts, the last element loaded using the same key name on the same parent will be the one referenced. For 'parentArray', multiple elements with the same key name on the same parent will simply be added to the array. Inherited 'parentKey' or 'parentArray' values are not overridden as usual, but are additive. If a 'parentKey' is set on both the inherited and inheriting element with different names, then both keys will be added to the parent and set to the same child. If multiple children in the same parent inherit the same template with a 'parentKey' set in the template, then that key will be set to the last child to load. Likewise, a template with 'parentArray' set would create or add to an array in the parent, in addition to whatever 'parentArray' key may be set in the inheriting element, and elements can get added more than once if any up the inheritance chain are set to the same key. These behaviors can be both incredibly confusing, like code targeting wrong element, and incredibly convenient, like adding all children to an array using one attribute in one template. For [[XML/Anchor|Anchor]]s within XML, 'parentKey' can be used with 'relativeKey', just like 'name' and 'relativeTo' are, to make an anchor point relative to another layout frame. Similarly must be prefixed to make it mean 'look in the parent', like '$parent.keyName' including the '.', to reference another child on the same parent. However, 'relativeKey' by default references a key set on itself, rather than a global name like 'relativeTo' does. With 'name' based anchors: name="$parentChild1" (on child 1) relativeTo="$parentChild1" (on child 2) With 'key' based anchors: parentKey="Child1" (on child 1) relativeKey="$parent.Child1" (on child 2) [[Category:XML elements]]
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)