View Single Post
05/31/22, 03:35 PM   #6
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 21
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