How to allow scrolling in combat?
I have a ScrollFrame that inherits from HybridScrollFrameTemplate. In it I am displaying buttons that inherit from SecureActionButtonTemplate. I can control setting the values by detecting when I am in combat. However, if someone tries to scroll while in combat an error is thrown:
1x [ADDON_ACTION_BLOCKED] AddOn 'Wholly' tried to call the protected function 'com_mithrandir_whollyFrameScrollFrame:SetVerticalScroll()'.
!BugGrabber\BugGrabber.lua:589 in function <!BugGrabber\BugGrabber.lua:589
[C]: in function `SetVerticalScroll'
FrameXML\HybridScrollFrame.lua:195 in function `HybridScrollFrame_SetOffset'
FrameXML\HybridScrollFrame.lua:30 in function <FrameXML\HybridScrollFrame.lua:29
[C]: in function `SetValue'
FrameXML\HybridScrollFrame.lua:67 in function <FrameXML\HybridScrollFrame.lua:57
I am not actually calling HybridScrollFrame_SetOffset within my addon code, but it is being called automatically by Blizzard code when scrolling happens.
Basically the whole frame setup is not secure, but the buttons need to be since I have them have macros set to target NPCs. As one plays in the UI, those buttons will have their specific macro values changed. I should be able to delay reseting the macro values until out of combat if the user were to change the the display while in combat.
So does anyone know if there a way I can get the scrolling not to give me an error?
|