GreenWall

GreenWall

1M Downloads

'InterfaceOptions_AddCategory' in 11.0

ashayo opened this issue ยท 5 comments

commented

Message: Interface/AddOns/GreenWall/GreenWall.lua:190: attempt to call global 'InterfaceOptions_AddCategory' (a nil value)
Time: Wed Jul 24 14:27:03 2024
Count: 1
Stack: Interface/AddOns/GreenWall/GreenWall.lua:190: attempt to call global 'InterfaceOptions_AddCategory' (a nil value)
[string "=[C]"]: in function InterfaceOptions_AddCategory' [string "@Interface/AddOns/GreenWall/GreenWall.lua"]:190: in function GreenWall_OnLoad'
[string "*GreenWall.xml:32_OnLoad"]:1: in function <[string "*GreenWall.xml:32_OnLoad"]:1>

commented

Fix at line 190
delete
InterfaceOptions_AddCategory(self)
insert

    local category = Settings.RegisterCanvasLayoutCategory(self, self.name)
    Settings.RegisterAddOnCategory(category)
commented

I had to make a similar change to my addon.

Fix at line 190 delete InterfaceOptions_AddCategory(self) insert

    local category = Settings.RegisterCanvasLayoutCategory(self, self.name)
    Settings.RegisterAddOnCategory(category)

I had to make a similar change to my addon to get my settings frame to work in the UI.

commented

I was thinking of making this change, based on discussion I have read else where on this issue. Does anyone know if Classic also has removed InterfaceOptions_AddCategory?

if InterfaceOptions_AddCategory then
    InterfaceOptions_AddCategory(self)
else
    local category, layout = Settings.RegisterCanvasLayoutCategory(self, self.name);
    Settings.RegisterAddOnCategory(category);
    addon.settingsCategory = category
end
commented

I was thinking of making this change, based on discussion I have read else where on this issue. Does anyone know if Classic also has removed InterfaceOptions_AddCategory?

I was going to ask the same question. We should use the guard condition if the classic and classic era versions haven't been updated.