View Single Post
06-13-15, 02:11 PM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Seerah View Post
You're calling :SetPoint() in your :SetPoint() hook, Resike. That'll make an infinite loop.

In WFWW, I create a container frame, parent the objective tracker to that, and move/size the container. Then I do this, to avoid the recursive :SetPoint call...
Lua Code:
  1. local cap = ObjectiveTrackerFrame.ClearAllPoints
  2.     local sp = ObjectiveTrackerFrame.SetPoint
  3.     hooksecurefunc(ObjectiveTrackerFrame, "SetPoint", function(self)
  4.         cap(self)
  5.         sp(self, "TOPLEFT", 30, -10)
  6.     end)
It's not infinite because of the moving variable.
  Reply With Quote