Action Button now a Mixin in 9.0 latest builds
nUI uses HookSecureFunc() to hook into alot of Wows ActionButton code. It appears it is all Mixins in 9.0.
Would I use the Mixin(addonFrame, BlizzardMixin) function to apply the appropriate Mixin to nUI's frames that replace Blizzards ?
Presumably it would be "mixed in" when you inherit the ActionButtonTemplate and everything else would remain the same. Much like the Backdrops.
If there is a "ActionBarActionButtonMixin:Update()" function I would check to see if that calls a global function you could hook if you want something universal.
Unfortunately the Update function and the others, do most if not all of the functionality they need in there with no external function calls at the end of the function I can hook into instead.
for reference these are the errors I have been getting
Before Changes : Interface\\AddOns\\nUI\\Bars\\nUI_Button.lua:225: hooksecurefunc(): ActionButton_Update is not a function
After Changes : Interface\\AddOns\\nUI\\Bars\\nUI_ButtonBar.lua:697: attempt to call method 'initActionButton' (a nil value)
This might be my lack of lua knowledge but I tried the following. It gets rid of the initial errors but introduced a few more and apparently made no difference. I even tried the suggestion made for another similar scenario here : https://www.wowinterface.com/forums/...ad.php?t=56515 with no joy. The same result when I tried the way that worked elsewhere .. https://www.wowinterface.com/forums/...ad.php?t=56578.
I created a function HookButtonFunctions(button) that is called as soon as nUI starts to create a button for each bar.
And I adjusted all the hooksecurefunc entries from ActionButton_xxxx ones to self.xxxx and also tried self:xxx and wrapped the HookButtonFunctions function above around them all. But neither must work as it makes the initial createBar function now fail as it no longer exists.
So .. if Blizzard has now made each button a mixin so that now you have mixin:Update, mixin:OnUpdate etc funcitons that need to be overridden would I used self.Update or self:Update etc to hook them ?
Here is an example of two of the smaller functions
What did seem to work after a few restarts ..
|All times are GMT -6. The time now is 03:23 AM.|
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI