[Bug] SNIPPETS "ON_PROFILE" working wrong
cordankos opened this issue ยท 1 comments
**What version of TellMeWhen are you using? **
8.6.0
What steps will reproduce the problem?
- Create 2 profiles with lua profile snippets
- Write in each snippet different table or function, put them in icon's lua condition for each profile, type of icon "Icon Condition" with condition tab "LUA": "return func()"
- Then just swap profiles, second profile will alarm always for nil table or function
What do you expect to happen? What happens instead?
TMW:RegisterCallback("TMW_ON_PROFILE", function(event, profileEvent, arg2, arg3) if profileEvent == "OnProfileChanged" then RunSnippets() end end)
https://github.com/ascott18/TellMeWhen/blob/classic/Components/Core/Snippets/Snippets.lua
This part working wrong, because before get into RunSnippets all groups and icons use setup method. Snippets should be loaded before setup, fixed it through TMW_GLOBAL_UPDATE to run profile snippets which is not running BEFORE frames :setup(). Happens only when you SWAP profiles, on initialize works OK.
Screenshots and Export Strings
Not required, fix above.
Additional Info
Not required, fix above.