Originally Posted by Baertram
The hook should work as the ACHIEVEMENTS global exists, is the correct object of the Achievment class.
I've read the code this way:
https://github.com/esoui/esoui/blob/...ents.lua#L1893
Called by the XML's OnInitialized event -> ZO_Achievements_OnInitialize(self) -> ACHIEVEMENTS = Achievements:New(self) ->
https://github.com/esoui/esoui/blob/...ments.lua#L949
-> object:Initialize(...) -> https://github.com/esoui/esoui/blob/...ments.lua#L963
-> function Achievements:Initialize(control) -> self:InitializeSummary()
-> function Achievements:InitializeSummary()
Try to use MerTorchbug Updated or zgoo to inspect the ACHIEVEMENTS table if the function InitializeSummary is given (maybe below the __index sub-metatables) and try to run it via SHIFT or CTRL+click. Does your d() mesages show then? Or if you explicitly call it like
/tb ACHIEVEMENTS:InitializeSummary()
Or it was done before the chat output is ready so you are not seeing it (will first be visible at event_player_activated!).
-> Install the addon pChat which should fix this.
-> OR/AND use the LibDebugLogger and the DebugLogViewer UI to see the addon debug messages prior the chat output is ready + stored in your SavedVariables.
But: I've added your code to any of my addons event_player_activated callback function and I also do not see it.
So maybe it's a oo generic achievement class you try to hook there.
Or you expect this to be something that is not the UI element you want to get into depth with?
|
Manually calling the function showed the output. LibDebugLogger is what I was already using to inspect the chat output. Do I need to set the time to "Current Session"? When I did that, I saw thousands of prints along the line of "Avoiding cycle on table..." which originated from my addon.
Stacktrace:
Lua Code:
. Avoiding cycle on table...
|rstack traceback:
user:/AddOns/LibDebugLogger/Initialization.lua:80: in function 'LogChatMessage'
EsoUI/Libraries/Utility/ZO_Hook.lua:18: in function 'AddDebugMessage'
EsoUI/Libraries/Globals/DebugUtils.lua:7: in function 'EmitMessage'
EsoUI/Libraries/Globals/DebugUtils.lua:27: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:30: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:30: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:30: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:30: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:30: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:30: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:30: in function 'EmitTable'
EsoUI/Libraries/Globals/DebugUtils.lua:41: in function 'd'
user:/AddOns/QuantumsGlobalAchievements/QuantumsGlobalAchievements.lua:12: in function 'addon:Test'
user:/AddOns/QuantumsGlobalAchievements/QuantumsGlobalAchievements.lua:25: in function 'addon:Initialize'
user:/AddOns/QuantumsGlobalAchievements/QuantumsGlobalAchievements.lua:32: in function 'OnAddOnLoaded'