diff --git a/docs/ADDON_COMPAT.md b/docs/ADDON_COMPAT.md index 6597e319..1b5c37d8 100644 --- a/docs/ADDON_COMPAT.md +++ b/docs/ADDON_COMPAT.md @@ -1678,3 +1678,86 @@ Two details are load-bearing and both are pinned by tests: inside `SetCVar`, which is *before* the `PlaySoundFile` that follows it in the same addon function. A cut applied after the drain would stop the new clip instead of the old one — the symptom inverted rather than fixed. + +## Six things an Era-era addon assumes a 1.12 template or verb carries, and this realm's does not + +grom's 2026-11-02 session: the settings window would not open, the pfUI panel at the bottom-right +corner stayed up through CineMode, and Cinematic's minimap button never joined pfUI's drawer. Five +of the six below are in the two ported addons, one is ours. The log that named them is +`benilla-config/Logs/benilla.log` at 10.882 s (40 of its 48 errors) and 46.1–46.2 s (the rest). + +### `OptionsListButtonTemplate` has no `toggle`, and the newest AceGUI installed is the one that wins + +`AceGUIContainer-TreeGroup.lua`'s `CreateButton` builds each category row from +`OptionsListButtonTemplate` and then writes `button.toggle.button = button`. On Era that `toggle` is +a child of the template, declared `parentKey="toggle"`. **This realm's template carries `$parentText` +and `$parentBar` and nothing else** (`Interface\FrameXML\OptionsFrameTemplates.xml`, whose OnLoad +sets `this.bar` and `this.text` by name), so the field is nil and the next line raises. + +Three copies of AceGUI-3.0 are installed — SoftSpoken_Stories' at widget version 41, +MasterTradeSkills' at 42, and **OpenMapClassic's at 49**, which is a straight retail copy this port +brought in. LibStub keeps the highest version, so the retail one is the TreeGroup *every* addon's +config window gets, and the two 1.12 backports sitting beside it never run. One template gap in one +file therefore broke the whole install's options UI: the window opened and its category tree was +empty, three raises deep. + +Fixed in the port: `CreateButton` builds the toggle itself when the template has none, in the shape +the Era child has, so `UpdateButton`'s Show/Hide and `Expand_OnClick` need no change. Measured +offline — `InterfaceOptionsFrame_OpenToCategory()` now builds the window with **0 errors** and +`AceGUI30TreeButton1` carries both `toggle` and `text`. + +### A frame built from `UIPanelScrollFrameTemplate` or `SearchBoxTemplate` must be **named** + +Both templates reach their own children through the frame's name, not through a parent key: +`ScrollFrame_OnLoad` is `_G[this:GetName().."ScrollBarScrollDownButton"]:Disable()` +(`UIPanelTemplates.lua:244`), and `SearchBoxTemplate`'s inline OnLoad is +`this.label = _G[this:GetName().."Label"]`. Passing `nil` for the name — which is free on Era, where +both carry `parentKey`s — makes the concatenation raise, on the reference client exactly as here. + +Nine sites across the two ports did that: eight scroll frames (**every Cinematic options page**, via +the one `CreateScrollPage` helper) and two search boxes. The error is contained — our `CreateFrame` +catches a template OnLoad's raise and still returns the frame, as the reference's error handler does +— so nothing aborted; the pages simply came up **with no scroll bar** and the search boxes with no +label, and 40 lines went into the log every login. All nine are named now, the two helpers that run +many times from a counter. + +This is not an engine gap: a 1.12 addon owes these templates a name, and the one addon that wanted +the whole surface without one is the port. + +### `GetDebugName()` + +Ours. The era's "what is this frame called" for a log line, and the one that answers for an +**unnamed** frame, which `GetName` cannot — which is exactly why an addon keeping a list of frames +reaches for it. `Cinematic/Frames.lua:3734` is `entry.name or entry.frame:GetDebugName()`, so +`/cine debug frame ` raised on the first unnamed row instead of printing the row asked for. +Built on all three method tables; the unnamed leg deviates in its fallback only, and +`tests/widget_surface.rs` carries the row that says so. + +### `ClearOverrideBindings` and the five `SetOverrideBinding*` setters + +Ours. 2.0's secure-binding layer: a second, unsaved binding table a frame owns, outranking the saved +one while that frame wants it. This client models only the saved table (`script/keybind.rs`), so the +five setters are **no-ops that say so once** through the script warning channel and +`ClearOverrideBindings` is a silent one — dropping a table that was never filled *is* nothing, and +warning there would fire on every `ClearRecast()`. Before this the clear was absent outright and +raised in grom's chat on every camera shot that ended (`Cinematic/Camera.lua:470`). +`compat/classic_api/override_bindings.rs`'s header lists what a real layer needs, and the +`SecureHandler*` half in `secure.rs` is the same table seen from inside a snippet. + +### pfUI's two panel bars were not in Cinematic's fade list + +`pfPanelLeft` and `pfPanelRight` (`pfUI/modules/panel.lua:675,712`) are the bars the panel widgets +sit *on*. The widgets were all listed and the bars were not, so CineMode faded the clock and the +gold and left an empty bar standing in each bottom corner — the bottom-right one is what grom saw. +Both added to the `pfuiPanels` row, with the four remaining `panel.lua` widgets +(`pfPanelBindLocation` and the three rogue counters). + +### A minimap-button drawer only collects the minimap's **own children** + +pfUI's `pfMinimapButtons` scans `FindButtons(Minimap)` and `FindButtons(MinimapBackdrop)` +(`modules/addonbuttons.lua`). Cinematic's button lives on `UIParent` and is placed by angle around +the rim, because the minimap shrinks to nothing while faded — so the drawer never saw it. The port +already had this case for EllesmereUI's drawer; pfUI's is the same shape, so the test became "is +there a drawer" rather than "is it EllesmereUI", and `ns.UpdateMinimapButton` hands the button over +on Core's scan if a drawer appeared after it was built (pfUI builds its panel a frame after login). +Measured offline: `CinematicMinimapButton`'s parent is now `pfMinimapButtons`.