WoWInterface - View Single Post - TargetFrameAura manipulation
View Single Post
07-24-20, 12:28 PM   #9
I did that?
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,276
TargetFrame:SetScript("OnLoad", test)
Given this is a Blizzard frame and non "load-on-demand" Blizzard code loads before 3rd party addons, by the time your code tries to set the TargetFrame OnLoad script, it is well past having done its thing.
TargetFrame:SetScript("WHATEVER", test)
This should give an error saying the frame has no WHATEVER script (assuming that's actual code) so the following line (test(true)) won't run because the error would have stopped execution.

Using a SetScript on someone else's frame is not a good idea as it overrides the original.
TargetFrame:HookScript("OnShow", function(self)  "do whatever" end)
Runs your code after the original script has run.
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 07-24-20 at 02:32 PM.
  Reply With Quote