WoWInterface SVN MultiScreenSupport

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/Libs/AceConfig-3.0/AceConfigRegistry-3.0
    from Rev 17 to Rev 18
    Reverse comparison

Rev 17 → Rev 18

AceConfigRegistry-3.0.lua
4,14 → 4,14
-- * Valid **uiTypes**: "cmd", "dropdown", "dialog". This is verified by the library at call time. \\
-- * The **uiName** field is expected to contain the full name of the calling addon, including version, e.g. "FooBar-1.0". This is verified by the library at call time.\\
-- * The **appName** field is the options table name as given at registration time \\
--
--
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id: AceConfigRegistry-3.0.lua 1193 2018-08-02 12:24:37Z funkydude $
-- @release $Id: AceConfigRegistry-3.0.lua 1207 2019-06-23 12:08:33Z nevcairiel $
local CallbackHandler = LibStub("CallbackHandler-1.0")
 
local MAJOR, MINOR = "AceConfigRegistry-3.0", 18
local MAJOR, MINOR = "AceConfigRegistry-3.0", 20
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
33,7 → 33,7
 
 
AceConfigRegistry.validated = {
-- list of options table names ran through :ValidateOptionsTable automatically.
-- list of options table names ran through :ValidateOptionsTable automatically.
-- CLEARED ON PURPOSE, since newer versions may have newer validators
cmd = {},
dropdown = {},
94,13 → 94,20
}
 
local typedkeys={
header={},
header={
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
description={
image=optstringnumberfunc,
imageCoords=optmethodtable,
imageHeight=optnumber,
imageWidth=optnumber,
fontSize=optstringfunc,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
group={
args=istable,
117,6 → 124,9
imageCoords=optmethodtable,
imageHeight=optnumber,
imageWidth=optnumber,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
input={
pattern=optstring,
130,6 → 140,9
tristate=optbool,
image=optstringnumberfunc,
imageCoords=optmethodtable,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
tristate={
},
141,12 → 154,16
step=optnumber,
bigStep=optnumber,
isPercent=optbool,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
select={
values=ismethodtable,
sorting=optmethodtable,
style={
["nil"]=true,
["string"]={dropdown=true,radio=true},
["nil"]=true,
["string"]={dropdown=true,radio=true},
_="string: 'dropdown' or 'radio'"
},
control=optstring,
164,9 → 181,14
},
color={
hasAlpha=optmethodbool,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
keybinding={
-- TODO
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
}
 
203,13 → 225,13
if type(options.type)~="string" then
err(".type: expected a string, got a "..type(options.type), errlvl,...)
end
 
 
-- get type and 'typedkeys' member
local tk = typedkeys[options.type]
if not tk then
err(".type: unknown type '"..options.type.."'", errlvl,...)
end
 
 
-- make sure that all options[] are known parameters
for k,v in pairs(options) do
if not (tk[k] or basekeys[k]) then
302,7 → 324,7
AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl) -- upgradable
AceConfigRegistry.validated[uiType][appName] = true
end
return options
return options
end
elseif type(options)=="function" then
AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
340,7 → 362,7
if not f then
return nil
end
 
 
if uiType then
return f(uiType,uiName,1) -- get the table for us
else