View Single Post
03/27/23, 08:48 AM   #29
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 247
Originally Posted by Baertram View Post
It cannot work by any other way

If settings were not opened the control is nil, so just save without updating the control. As noone opened the settings noone will see the label or tries to see the label, so there is no reason to update it !
If the settings were opened, use the controls created calback, check for YOUR addon's panel and then update the description text of the label.
If it does not dautomatically update by changing the conrol.data.title or control.data.text value, try to change the control.data.title or .text attributes and then call control:UpdateValue() function, it should update the label's text then based on the data table.

I would be happy doing that except the settings panel IS getting its data ON_LOAD and storing it someplace during the MyAddon:CreateSettingsWindow(). So whats happening is user logs in and plays etc, then right clicks someone to "Save players @NAME" for my addon use which works fine except the settings panel still shows the OLD @NAME when you open the addon settings. SO it IS getting the data and storing it someplace and then creating the controls with it later when you open the addon settings. I need to find where that place is and edit that when the control data is NIL.

I currently have a temporary fix for people with your idea of detectinf if the data is nil so it just skips it.. addon works fine but cosmetically the settings panel will always show the previous @NAME the 1st time they open addon settings. Infact will always show the previous one until they have opened the addon settings so I can then edit the field properly.

Last edited by sinnereso : 03/27/23 at 08:55 AM.
  Reply With Quote