fix(compat): guard retail-only InterfaceOptions globals and Settings.* API
AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua: the Constructor parented its frame to the global InterfaceOptionsFramePanelContainer, which is nil at AceGUI widget-construction time on the CoA reworked FrameXML. Guard with 'local _parent = InterfaceOptionsFramePanelContainer or UIParent' and pass _parent to CreateFrame so addons that register a Blizzard Interface Options panel don't error out during load. AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua: :AddToBlizOptions used the Dragonflight+ Settings.* API (GetCategory, RegisterCanvasLayoutCategory, RegisterCanvasLayoutSubcategory, RegisterAddOnCategory). The Settings table doesn't exist on the 3.3.5-based CoA client, so every AceConfig-driven options panel errored the moment it was registered. Wrap the whole Settings.* block in 'if Settings and Settings.GetCategory then ... else ... end' and fall back to the WotLK-era InterfaceOptions_AddCategory(group.frame) after stamping the category name via group:SetName(name or appName, parent). Both retail and CoA paths now work; behaviour on retail is unchanged. luac -p passes on both files. README CoA-compat patches table updated (entries 2 and 3). This bundle is the source-of-truth for the Exiles/coa-* forks; the propagation to bartender / quartz / shadowedunitframes / ai-voiceover / etc. bundled Ace copies is handled separately.
This commit is contained in:
@@ -99,7 +99,11 @@ local methods = {
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
|
||||
-- CoA-compat: InterfaceOptionsFramePanelContainer is a global from the stock 3.3.5
|
||||
-- Interface Options frame; on the CoA reworked FrameXML it can be nil at the time
|
||||
-- AceGUI widgets are constructed. Fall back to UIParent so CreateFrame doesn't blow up.
|
||||
local _parent = InterfaceOptionsFramePanelContainer or UIParent
|
||||
local frame = CreateFrame("Frame", nil, _parent)
|
||||
frame:Hide()
|
||||
|
||||
-- support functions for the Blizzard Interface Options
|
||||
|
||||
Reference in New Issue
Block a user