Hi all
I am having trouble with
InterfaceOptionsFrame_OpenToCategory
I have checked the updated
InterfaceOptionsFrame.lua and found the open to category function at line
419
I have not been able to get it working at all.
Here is my frame;
Lua Code:
local NewbDevBoxInterfaceFrame = CreateFrame("Frame", "NewbDevBoxInterfaceFrame", UIParent, "BackdropTemplate")
NewbDevBoxInterfaceFrame.name = "Newb Dev Box"
NewbDevBoxInterfaceFrame:SetBackdrop(
{
bgFile = "Interface\\Buttons\\WHITE8X8",
insets = {
left = NumberList.insetSize,
right = NumberList.insetSize,
top = NumberList.insetSize,
bottom = NumberList.insetSize
},
tileSize = nil,
tile = false,
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
edgeSize = NumberList.edgeSize
}
)
NewbDevBoxInterfaceFrame:SetBackdropColor(unpack(TextDimensionList.colourBackdrop))
NewbDevBoxInterfaceFrame:SetBackdropBorderColor(unpack(TextDimensionList.colourBorder))
NewbDevBoxInterfaceFrame:SetScript(
"OnEvent",
function(self, event, ...)
if event == "PLAYER_LOGIN" then -- fires when a player logs in or reloads
print(TextStringList.addonLoaded) -- Load Message
initialiseLists()
setUpNewbDevBoxSortedTable()
checkOtherAddonsEnabled()
setCheckBoxesAndButtonFrameMetrics()
buttonFrameButtonLayout()
end
end
)
NewbDevBoxInterfaceFrame:RegisterEvent("PLAYER_LOGIN") -- fires when a player logs in or reloads
NewbDevBoxInterfaceFrame:RegisterEvent("ADDON_LOADED") -- fires when an addon is loaded
InterfaceOptions_AddCategory(NewbDevBoxInterfaceFrame)
My function;
Lua Code:
function NEWBDEVBOXTOGGLENEWBDEVBOXINTERFACEFRAME()
if InterfaceOptionsFrame:IsShown() then
InterfaceOptionsFrame:Hide()
else
InterfaceOptionsFrame_OpenToCategory(NewbDevBoxInterfaceFrame) -- have to do this twice because reasons
InterfaceOptionsFrame_OpenToCategory(NewbDevBoxInterfaceFrame)
end
end
And the error;
Lua Code:
1x Interface/AddOns/NewbDevBox/NewbDevBox.lua:441: attempt to index global 'InterfaceOptionsFrame' (a nil value)
[string "@Interface/AddOns/NewbDevBox/NewbDevBox.lua"]:441: in function `NEWBDEVBOXTOGGLENEWBDEVBOXINTERFACEFRAME'
[string "@Interface/AddOns/NewbDevBox/NewbDevBox.lua"]:1382: in function <Interface/AddOns/NewbDevBox/NewbDevBox.lua:1381>
Locals:
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index global 'InterfaceOptionsFrame' (a nil value)"
(NewbDevBoxInterfaceFrame)
As you can see the error says that the frame does not exist, yet when I navigate to the addons list I can see and use the category frame without a problem or an error.
I guess something changed with the pre-patch yet I cannot figure out a reason that
InterfaceOptionsFrame_OpenToCategory no longer works for me.
Looking for some help with this one.