View Single Post
09-02-19, 04:26 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
If I add a new variable to the default data table I just preset that value and add it to the existing data.


dataTable = dataTable or {}
.. if dataTable is Empty set to default values
.. Add new Data

This way if they have installed a new addon with no data it will create it, if they already have data it will just add a default version of the new data.

If you need them to reset their data for an update due to changes just make sure that information is provided in the patch file and/or main addon page so that they know they may need to go through their settings again.


I think nUI used the version number system and had a function run through that checked which version was last used by the player and the new version and make any necessary changes to the data at that point before setting the new version as the new last used.

Edit: After all that, I just noticed the Ace3 in the title rofl. I haven't used their library so can't help in that particular area. But hopefully someone will be able to help you. Good Luck.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 09-02-19 at 04:30 PM.
  Reply With Quote