View Single Post
01-06-20, 03:14 AM   #5
KingBoo
A Defias Bandit
Join Date: Jan 2020
Posts: 2
Say you have a default of "pet" = "dog". You will see nothing in the SV file for that entry. Should the user change "pet" = "cat" then you will see MyAddOnDB.profile.pet = "cat" in the SV file.
Currently i am using the format ["regex value"] = true format to store data. I know that default values wont appear in the SV file.

What do you mean by an "empty state"? And in your OnItialize() function you specify RaidSummonSyncDB = {} on top of self.db = LibStub("AceDB-3.0"):New("RaidSummonOptionsDB", defaults, true). Why are you setting up two saved variables, one without AceDB? For that matter, line 223 tells the addon to wipe RaidSummonSyncDB each time it is loaded.
Empty state is when the user deletes all default values. When he does that, after a reload or restart of WoW the table will have the default values again (instead of no values at all). I need some options to allow storing keys that are empty like creating a new variable "keywordsareemptybyuserdecision". But that would be only a workaround.

Side note, line 1 should begin with the word local and optionsProfile on line 209 should also be localized.
Will do that in the next update, thanks for the tip.

BTW, what are the types for the keywords in your options table? Am I not seeing those entries?
I am using the standard Ace3 types like execute, toggle, select and input. Starting at line 5.

I only want to store data in the variable RaidSummonOptionsDB in the SV file. No need to store RaidSummonSyncDB.
  Reply With Quote