Gaming
 

MCom.loadConfig

From WoWWiki

This article is a part of the documentation of the MCom function library

 --[[ 
   loadConfig ( {reglist} )
     This will load all variables stored in the passed table in MComStorage.  This only works on variables that have stored the data using
     MCom.saveConfig
     
   Args:
     reglist - This contains all options for this load 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 loaded from this var, regardless of realm/character.  It will get from this exact var.  This
                             takes precidence over storeVar.
         (string) realm  - This allows you to specify the realm to load from, if not passed, then the current realm will be used.
         (string) character  - This allows you to specify the character to load from, 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) loadList -  The names of all variables in the config to be loaded, if this is not passed, then MCom will try to load
                                       all variables except the MComStorage variable.
         (string or table) ignoreList - The names of any variables that you want MCom to not load.
         (string or table) uiList -  These variables will only be loaded 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 load these vars, even if they are nil.
                                       is affected by the rules set by the above lists as well.
       }
     
     Returns:
       true - Some data was loaded
       false - No data was loaded
 ]]--