View Single Post
03/28/23, 04:21 AM   #34
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,002
The callback for lam needs to be registered once! In you addons settings code. Not each time in your "SavePlayer" function.

Having it the way you use it now will make the else... execute for each addon, not only yours! If you use 30 addons with settings (or anyone else using your addon does) it will run the panel callback code 30 times for nuts!

Just move the callback code to the lam creation and use the panel parameter of the callback to check if it is your panel as described above in my last post (you get the panel to compare from your lam registerAddonPanel function! After that create the callback for controlsCreated once, and also create the callback for panelOpened to update your description. This will update the description label each time your settings panel opens, so using your player saved function does not need to update that label, unless you use it while the settings panel is actually opened? Then just check if the control is not nil and update directly ).

Last edited by Baertram : 03/28/23 at 04:30 AM.
  Reply With Quote