ObjectiveTrackerFrame OnLoad


Has the ability to hook the OnLoad handler for this frame been removed/blocked? I had written a small addon that allowed you to move the Objective Tracker around, but some time ago, it stopped working.

e.g. My hook looked like this:

local function MyFunc(self)
    self.HeaderMenu.MinimizeButton:SetPoint("TOPRIGHT", MyFrame)

. . .

if event == "PLAYER_LOGIN" then
    ObjectiveTrackerFrame:HookScript("OnLoad", MyFunc)

This used to work perfectly, but now, MyFunc never fires. I’ve tried working around it and using

hooksecurefunc(ObjectiveTrackerFrame, "SetPoint", MyFunc)

this does work, but I get multiple initial C Stack Overflow errors once on client load, but once I close the Lua Error window, I don’t get those errors again until another client load e.g. /reload, etc, and my addon seems to work as intended.

Any help would be appreciated.

(Fizzlemizz) #2

You don’t need to hook/wait for the ObjectiveTrackerFrame OnLoad as it has well and truly been executed before your addon is even considered for loading.

local f = ObjectiveTrackerFrame
f.ClearAllPoints = function() end
f.SetPoint = function() end
f = f.HeaderMenu.MinimizeButton
f:SetPoint("TOPRIGHT", MyFrame)


Thank you so much. This works awesome, and I see why my old hookscript stopped working.