View Single Post
01-15-24, 05:48 AM   #3
soulreeperxiii
A Murloc Raider
Join Date: Jan 2024
Posts: 4
I am working with Blizzard_CraftUI.lua and Blizzard_CraftUI.xml
Neither of those two functions are documented, I am inferring what they do by looking at Blizzards code.
Its the DoCraft() function that fires the Protected event.

I think its a secure environment that I need? But I cant figure out how to do it. Here's what I've come up with so far:

Code:
local button = CreateFrame("Button", "FrameButton", UIParent, "SecureHandlerBaseTemplate")
button:SetScript("OnClick", function()
	local index = GetCraftSelectionIndex()
	DoCraft(index)
end)
  Reply With Quote