diff --git a/Core/Tooltips.lua b/Core/Tooltips.lua index 4e6c63a..4827034 100644 --- a/Core/Tooltips.lua +++ b/Core/Tooltips.lua @@ -200,14 +200,17 @@ if UI and UI.RegisterSettingsSection then Box("tipSkin", L.TIPSET_SKIN) Box("tipCursor", L.TIPSET_CURSOR) function f.Refresh() + T.lastError = nil for _, o in ipairs(options) do if not made[o.key] and (not o.available or o.available()) then made[o.key] = true + local okb, err if o.max then - Slider(o) + okb, err = pcall(Slider, o) else - Box(o.key, FW.L[o.label] or o.label) + okb, err = pcall(Box, o.key, FW.L[o.label] or o.label) end + if not okb then T.lastError = tostring(err) end end end for _, cb in ipairs(boxes) do cb:Refresh() end @@ -226,3 +229,16 @@ if UI and UI.RegisterSettingsSection then if f and f.Refresh then f.Refresh() end end end + +-- Diagnose: /fwtips zeigt, welche Module Optionen angemeldet haben +_G.SLASH_FWTIPS1 = "/fwtips" +_G.SlashCmdList = _G.SlashCmdList or {} +_G.SlashCmdList["FWTIPS"] = function() + local function say(t) if _G.DEFAULT_CHAT_FRAME then _G.DEFAULT_CHAT_FRAME:AddMessage("|cff9d7826Freewood Tooltips:|r " .. t) end end + say("Optionen angemeldet: " .. #options .. ", Abschnitt gebaut: " .. tostring(T.settingsFrame ~= nil) .. ", Quest-Modul: " .. tostring(FW.Quest ~= nil or (_G.FreewoodQuestDB ~= nil))) + for _, o in ipairs(options) do + local av = (not o.available) or o.available() + say(" " .. o.key .. " verfuegbar=" .. tostring(av and true or false) .. " Wert=" .. tostring(T.Get(o.key))) + end + if T.lastError then say("Fehler: " .. T.lastError) end +end diff --git a/Freewood-OctoWoW-Core.toc b/Freewood-OctoWoW-Core.toc index a8bc1e4..e77d7ef 100644 --- a/Freewood-OctoWoW-Core.toc +++ b/Freewood-OctoWoW-Core.toc @@ -3,7 +3,7 @@ ## Notes: Base addon of the Freewood family: data storage, UI kit, export/import and the main window. ## Notes-deDE: Basis-Addon der Freewood-Familie: Datenspeicher, UI-Bausteine, Export/Import und Hauptfenster. ## Author: Lacustat -## Version: 0.1.178 +## Version: 0.1.179 ## SavedVariables: FreewoodDB ## SavedVariablesPerCharacter: FreewoodCharDB