NumyAddon / TalentTreeViewer

https://www.curseforge.com/wow/addons/talenttree-viewer
2 stars 0 forks source link

Shift-clicking minimap button throws error if UI was not yet opened #2

Closed tflo closed 1 year ago

tflo commented 1 year ago

When I shift-click the minimap button to make it go away, I get this error:

Details ```text 1x .../TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:47: attempt to index global 'TalentViewer' (a nil value) [string "@TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua"]:47: in function `OnClick' [string "@BugSack/Libs/LibDBIcon-1.0-45/LibDBIcon-1.0.lua"]:144: in function Locals: (*temporary) = nil (*temporary) = true (*temporary) = nil (*temporary) = "attempt to index global 'TalentViewer' (a nil value)" LibDBIcon = { Register = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:329 callbacks =
{ } Unlock = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:351 loggedIn = true Lock = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:339 ShowOnEnter = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:427 SetButtonToPosition = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:460 SetButtonRadius = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:451 UnregisterAllCallbacks = defined @Accountant_Classic/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:174 notCreated =
{ } radius = 5 GetMinimapButton = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:402 AchievementFilterLDB =
{ } IsRegistered = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:377 tooltip = LibDBIconTooltip { } Hide = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:363 RegisterCallback = defined @Accountant_Classic/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90 Show = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:368 GetButtonList = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:443 UnregisterCallback = defined @Accountant_Classic/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:153 Refresh = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:381 objects =
{ } callbackRegistered = true Load = defined @Krowi_AchievementFilter/Icon.lua:36 IconCallback = defined @BugSack/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua:25 } name = "TalentTreeViewer_Loader" TVLoader =
{ RegisterToBlizzMove = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:139 GetTV = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:134 ADDON_LOADED = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:13 OnInitialize = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:24 AddButtonToBlizzardTalentFrame = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:80 LoadTV = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:129 db =
{ } ToggleTalentView = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:125 HookIntoBlizzardImport = defined @TalentTreeViewer_Loader/TalentTreeViewer_Loader.lua:91 } ```

When I open TalentViewer first and then shift-click the minimap button, then it goes away without errors. Seems something is not yet loaded when it should be.

– Tom

Numynum commented 1 year ago

fixed in next update :)