Thread Tools Display Modes
11-18-22, 02:30 AM   #1
OverCraft
A Murloc Raider
Join Date: May 2021
Posts: 4
How to Hook to the new ContainerFrame style with Mixin

In the new bag system there are a lot of changes: https://www.townlong-yak.com/framexm...ainerFrame.lua

I use to hook to:
Code:
hooksecurefunc('ContainerFrame_Update', function (frame)
    print("Signal", frame:GetName(), frame:GetID(), frame.size)
end)
But ContainerFrame_Update(frame) doesn't exist anymore because all functions are referenced inside of a mixin table.

**Fixed: I hook the update function from this enumeration table "frame" here:
Code:
for i, frame in ContainerFrameUtil_EnumerateContainerFrames() do
print(i,frame)
end
I still do not get the "new" mixin style, it makes the code more difficult to read for me. It works like objects and classes, but its difficult to address the global function name from the final object itself, this style of coding is getting in all parts with each patch, and it varies a lot from 1 file to others .

Last edited by OverCraft : 11-18-22 at 01:09 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to Hook to the new ContainerFrame style with Mixin


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off