Started having an issue earlier where AceDB wasn't keeping my settings, however my SavedVariables are saving right. Was wondering if anybody has encountered this before. I'm using AceConfig with a dropdown to choose between "BOTTOM" and "TOP". When I do the call to Refresh() it changes correctly, but after a UIReload it goes back to the BOTTOM.
TOC Information:
Lua Code:
## SavedVariables: TEST_CONFIG, XIVBarDB
Here's how I'm initiating the DB (in AddOn:OnInitialization):
Lua Code:
self.db = LibStub("AceDB-3.0"):New("XIVBarDB", self.defaults)
Here's the defaults:
Lua Code:
XIVBar.defaults = {
profile = {
general = {
barPosition = "BOTTOM",
},
color = {
barColor = {
r = 0.25,
g = 0.25,
b = 0.25,
a = 1
},
normal = {
r = 0.8,
g = 0.8,
b = 0.8,
a = 0.75
},
inactive = {
r = 1,
g = 1,
b = 1,
a = 0.25
},
useCC = true,
hover = {
r = 1,
g = 1,
b = 1,
a = 1
}
},
text = {
fontSize = 12,
smallFontSize = 11,
font = L['Homizio Bold']
},
modules = {
}
}
};
SavedVariables:
Lua Code:
XIVBarDB = {
["profileKeys"] = {
["Chiasmae - Zul'jin"] = "Chiasmae - Zul'jin",
},
["profiles"] = {
["Chiasmae - Zul'jin"] = {
["general"] = {
["barPosition"] = "TOP",
},
},
},
}
Here's how I'm setting it in my AceConfig options:
Lua Code:
set = function(info, value) self.db.profile.general.barPosition = value; self:Refresh(); end,
Here's how I'm using it (in Addon:Refresh):
Lua Code:
self.frames.bar:SetPoint(self.db.profile.general.barPosition)
EDIT:
For reference, full source:
https://github.com/MilleXIV/XIV_Databar/tree/ace-rework and commit it broke after:
https://github.com/MilleXIV/XIV_Data...214a286bc1840b.