Quantcast
WoWInterface - View Single Post - AceDB lost default values on SetProfile
View Single Post
09-18-17, 05:47 AM   #4
maqjav
A Cyclonian
Join Date: Feb 2012
Posts: 49
Hey myrroddin.

Thanks for your help and your time.

I found what the problems was. I needed to add all these handlers to reload my "private.db" value.

Code:
self.db = LibStub("AceDB-3.0"):New("MyAddonDB", PROFILE_DEFAULTS)
self.db.RegisterCallback(self, "OnProfileChanged", "RefreshOptions")
self.db.RegisterCallback(self, "OnProfileCopied", "RefreshOptions")
self.db.RegisterCallback(self, "OnProfileReset", "RefreshOptions")

function MyAddon:RefreshOptions(event, database, newProfileKey)
	private.db = database.profile
end
With this everything works just fine.

Last edited by maqjav : 09-18-17 at 05:51 AM.
  Reply With Quote