Thread Tools Display Modes
07-23-24, 11:55 PM   #1
Walkerbo
A Frostmaul Preserver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 265
InterfaceOptions_AddCategory(frame)

Hi all

I am getting the following error:
Lua Code:
  1. 2x NewbDevBox/NewbDevBox.lua:517: attempt to call global 'InterfaceOptionsFrame_OpenToCategory' (a nil value)
  2. [string "@NewbDevBox/NewbDevBox.lua"]:517: in main chunk
It is showing a nil value for my frame.

Here is my frame:
Lua Code:
  1. local NewbDevBoxInterfaceFrame = CreateFrame("Frame", "NewbDevBoxInterfaceFrame", UIParent, "BackdropTemplate")
  2. NewbDevBoxInterfaceFrame.name = "Newb Dev Box"
  3. NewbDevBoxInterfaceFrame:SetBackdrop(
  4.     {
  5.         bgFile = "Interface\\Buttons\\WHITE8X8",
  6.         insets = {
  7.             left = NumberList.insetSize,
  8.             right = NumberList.insetSize,
  9.             top = NumberList.insetSize,
  10.             bottom = NumberList.insetSize
  11.         },
  12.         tileSize = nil,
  13.         tile = false,
  14.         edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
  15.         edgeSize = NumberList.edgeSize
  16.     }
  17. )
  18. NewbDevBoxInterfaceFrame:SetBackdropColor(unpack(TextDimensionList.colourBackdrop))
  19. NewbDevBoxInterfaceFrame:SetBackdropBorderColor(unpack(TextDimensionList.colourBorder))
  20. NewbDevBoxInterfaceFrame:SetScript(
  21.     "OnEvent",
  22.     function(self, event, ...)
  23.         if event == "PLAYER_LOGIN" then -- fires when a player logs in or reloads
  24.             print(TextStringList.addonLoaded) -- Load Message
  25.             initialiseLists()
  26.             setUpNewbDevBoxSortedTable()
  27.             checkOtherAddonsEnabled()
  28.             setCheckBoxesAndButtonFrameMetrics()
  29.             buttonFrameButtonLayout()
  30.         end
  31.     end
  32. )
  33. NewbDevBoxInterfaceFrame:RegisterEvent("PLAYER_LOGIN") -- fires when a player logs in or reloads
  34. NewbDevBoxInterfaceFrame:RegisterEvent("ADDON_LOADED") -- fires when an addon is loaded
  35. InterfaceOptions_AddCategory(NewbDevBoxInterfaceFrame)

Is there a new way to name frames, or has the InterfaceOptions_AddCategory changed?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
07-24-24, 12:25 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,972
See the Settings information.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-25-24, 05:05 PM   #3
Walkerbo
A Frostmaul Preserver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 265
Hi Fizzlemizz

Sorry for the delayed response.

Thanks for the link, what a massive change to settings, I am muddling through.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
07-25-24, 05:10 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,972
I showed someone how to update just today (where panel is the Config. frame).

https://us.forums.blizzard.com/en/wo...how/1900489/25
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 07-25-24 at 05:12 PM.
  Reply With Quote
07-25-24, 05:43 PM   #5
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 138
This is the code I ended up using. Where about is the actual config frame.

Code:
	if InterfaceOptions_AddCategory then
		InterfaceOptions_AddCategory(about)
	else
		local category, layout = _G.Settings.RegisterCanvasLayoutCategory(about, about.name)
		_G.Settings.RegisterAddOnCategory(category)
	end
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
  Reply With Quote
07-25-24, 08:12 PM   #6
Walkerbo
A Frostmaul Preserver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 265
Hi all

Thankyou both so much, the linked forum post really helped.

Cheers
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » InterfaceOptions_AddCategory(frame)


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