WoW:API and scripting quirks: Difference between revisions

m
→‎World of Warcraft Scripting Quirks: Corrected inherited/nested
mNo edit summary
m (→‎World of Warcraft Scripting Quirks: Corrected inherited/nested)
Line 13: Line 13:
** OnUpdate handlers are only called when the frame is visible.  
** OnUpdate handlers are only called when the frame is visible.  
** OnUpdate handles are called ''every'' frame. Use with care.
** OnUpdate handles are called ''every'' frame. Use with care.
** When inheriting frames, you can access the parent frame name with $parent.  
** When nesting frames, you can access the parent frame name in XML names with with $parent, this is a textual substitution and cannot be used in LUA code.  
** All [[Frames]] have a GetID() function which will obtain the ID specified in the XML.  ID's must be positive integers enclosed in quotes: ie. id="1" or id="20"
** All [[Frames]] have a GetID() function which will obtain the ID specified in the XML.  ID's must be positive integers enclosed in quotes: ie. id="1" or id="20"
** If you don't specify parent="UIParent" in your top-level frames, your frames won't be scaled according to the currently active UI scale.  This can lead to some hair-pulling as you try to figure out why your fonts are so huge.  (But, in some cases, not having that scaling might be desirable.)
** If you don't specify parent="UIParent" in your top-level frames, your frames won't be scaled according to the currently active UI scale.  This can lead to some hair-pulling as you try to figure out why your fonts are so huge.  (But, in some cases, not having that scaling might be desirable.)
Anonymous user