This thread is similar to my previous one, but I just can't figure out why AceDB is not working correctly.
I have followed the AceDB Tutorial here like 5 times and have read others but can't get AceDB working correctly.
https://www.wowace.com/projects/ace3...b-3-0-tutorial
Currently I have this menu:
It has toggles, sliders, dropdowns everything working nicely actually. Even the profiles tab works and i can see different profiles. (Like Realm, Default, Char etc.)
But nothing saves correctly. After reloading or logging out NOTHING is saved. I have deleted the saved variables probably 10x now and tried restarting, logging out, reloading etc. Nothing seems to work.
This is how the saved variables file looks like:
Lua Code:
gempDB = {
["profileKeys"] = {
["Wraths - Proudmoore"] = "Default",
},
["profiles"] = {
["Default"] = {
},
},
}
Which makes sense, the Menu in the screenshot is just filled with my default values.
This is my Initialization:
Lua Code:
G.ace = LibStub("AceAddon-3.0"):NewAddon("gempUI", "AceConsole-3.0", "AceEvent-3.0")
function G.ace:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("gempDB", defaults, true)
options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
LibStub("AceConfig-3.0"):RegisterOptionsTable("gempUI", options)
self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("gempUI", "gempUI")
end
If you want to see the full addon you can see it here:
https://github.com/gempir/gempUI/blo...9a1/config.lua
"gempDB" is my Saved Variables Variables references in the .toc file
Code:
## SavedVariables: gempDB
At this point I'm reading the AceDB code and trying to debug my way through it wanting to find out where I am doing something wrong.
I even copy pasted this example
https://wow.gamepedia.com/WelcomeHom...3_to_the_Party
and tried it out and can't get it working in my current setup. Which makes me think I am loading the libraries wrong or something? I have no clue at this point.
I'm running 0 addons besides my own addon so there is no interference with other libraries.
Has anyone struggled in a similar way with AceDB? I've tried not using acedb and saving into gempDB directly in the getters/setters. This works without a problem, but I really would like the Profile solution of AceDB and not write my own Profile management.