Thread: Resize frame
View Single Post
07-10-14, 05:15 PM   #29
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Why bother checking whether the corner resizers were already created, when the function will only run once per frame anyway? And if you're intending for the function to be able to run multiple times per frame (so that the checks make sense) then why re-create and re-set the same scripts on the resizers over and over instead of setting them just once when you create the resizers? Also, you have a huge amount of duplicate code in there, you're not using proper capitalization for frame types or layers or points, you're using if-end/if-end instead of if-else-end, and several things in there just don't make any sense, like:

Code:
frame.bottomrightframe:SetFrameLevel(frame.frameLevel + 7 or 20)
What on earth is the "or 20" for? There's no check being performed here...
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote