MCom.saveConfig
From WoWWiki
This article is a part of the documentation of the MCom function library
--[[
saveConfig ( {reglist} )
This will store all of the variables you want into a per realm, per character table(MComStorage) inside the passed variable.
This is meant to facilitate storing/loading variables on a per realm, per character basis. You must register the passed
variable for saving, yourself.
Args:
reglist - This contains all options for this save procedure
{
Required:
(string) configVar - The name of the config variable, this should have been registered for save by you, and must be a table with a simple
variable name. IE no .'s or []'s
Optional:
(string) storeVar - The name of the variable to load/store the data in. If not passed then configVar.MComStorage is used. Remember to register
it for saving.
(string) exactVar - If you pass this, then data will be stored in this var, regardless of realm/character. It will go into this exact var. This
takes precedence over storeVar.
(string) realm - This allows you to specify the realm to store to, if not passed, then the current realm will be used.
(string) character - This allows you to specify the character to store to, if not passed, then the current character will be used.
NOTE: For all the following, this will only work on root level variables. I.E. Whatever_Config.Variable. For this you would pass "Variable"
(string or table) saveList - The names of all variables in the config to be stored, if this is not passed, then MCom will try to store
all variables except the MComStorage variable.
(string or table) ignoreList - The names of any variables that you want MCom to not store.
(string or table) uiList - These variables will only be stored if there is no UI available. Any options that you have the UI controlling
should be included in here, so you can leave it up to the UI to properly load/save them.
(string or table) nonUIList - If this list is declared, then uiList will be ignored, and all variables, except these, will be considered UI
variables.
(string or table) forceList - After going through the normal vars, MCom will go through and save these vars, even if they are nil. This list
is affected by the rules set by the above lists as well.
}
Returns:
true - Some data was saved
false - No data was saved
]]--
