WoW:API and scripting quirks: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 14: Line 14:
** 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 inheriting frames, you can access the parent frame name with $parent.  
** All [[Frames]] have a GetID() function which will obtain the ID specified in the XML.
** 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.)
** If you get no error output, but your addon is simply not being loaded, make sure you don't have a syntax error in your .xml file.  A simple way to ensure that your xml is well-formed is to open it in Firefox; it will point out any XML structure errors to you. You can also check the contents of your Logs directory for errors.
** If you get no error output, but your addon is simply not being loaded, make sure you don't have a syntax error in your .xml file.  A simple way to ensure that your xml is well-formed is to open it in Firefox; it will point out any XML structure errors to you. You can also check the contents of your Logs directory for errors.
Anonymous user