WoWInterface - View Single Post - How can I hooksecurefunc with colon like this: "MainMenuBarMixin:OnShow"
View Single Post
08-19-18, 10:35 PM   #5
RealUI Developer
Gethe's Avatar
Premium Member
Join Date: Sep 2008
Posts: 941
It depends on 1) when the mixin is created 2) when the function is hooked and 3) when the frame has the mixin applied.

In Ammako's case, ExpBarMixin is created and is applied to a template in the frame xml, before any addon gets loaded. The template however is not used for instantiating a frame until PLAYER_ENTERING_WOLRD fires, which is typically after most addons are loaded. As such, any hooks applied to the mixin before PLAYER_ENTERING_WOLRD fires will propagate the the new frame.

In Nikita's case, MainMenuBarMixin is created and immediately used in the creation of MainMenuBar. This means there is no allowance for any hooks to be made and applied via the mixin.
Knowledge = Power; Be OP

Last edited by Gethe : 08-19-18 at 10:39 PM.
  Reply With Quote