Thread Tools Display Modes
Prev Previous Post   Next Post Next
05/31/22, 03:35 PM   #6
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 23
Originally Posted by sirinsidiator View Post
LAM simply calls your setFunc and passes the default value from the data table to it. Maybe you can add a log output to your setFunc to check if it is really not calling it?
I found out it might be caused by my enable option, which asks for a setFunc value but never use it. After I removed it from the options the registerForDefaults works well! Thanks for your inspiration

Code:
...
[1] = {
	type = "checkbox",
	name = GetString(MSAL_ENABLE_MSAL),
	tooltip = GetString(MSAL_ENABLE_MSAL_TOOLTIP),
	getFunc = function() return db.enabled end,
	setFunc = function(value) self:ToggleAutoLoot() end,
	default = true,
},
...
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » registerForDefaults doesn't work as expected


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off