Thanks for the hints unlimit. I did what you said, but still there seems to be something I'm missing. To make it simple, I tried using this code;
Lua Code:
local function SkinGrid()
local GridFrame = Grid and Grid:GetModule("GridFrame")
if GridFrame and GridFrame.registeredFrames then
-- print("Adding borders to Grid frames")
local function Grid_AddBorder(f)
CreateBorderLight(frame, LeUI.media.bordersize, LeUI.bordercolor, LeUI.bordercolor, LeUI.bordercolor, 2)
end
hooksecurefunc(GridFrame, "RegisterFrame", function(frame)
Grid_AddBorder(f)
end)
return true
end
end
if not SkinGrid() then
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:RegisterEvent("PLAYER_LOGIN")
f:SetScript("OnEvent", function()
if SkinGrid() then
f:UnregisterAllEvents()
f:SetScript("OnEvent", nil)
SkinGrid = nil
end
end)
end
Sadly, that doesn't do anything. I'm not sure about how hooksecurefunc works, but I'm guessing out of the blue that this code is something like this; "When grid spawns a new frame, this hooksecurefunc 'senses' it and fires my Grid_AddBorder function, which is a command that tells !beautycase to add a border to the frame spawned by grid".
Please, correct me if I'm wrong. Which I probably am