WoWInterface SVN zzcommon

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 113 to Rev 114
    Reverse comparison

Rev 113 → Rev 114

LibCommon/common.lua
1,6 → 1,6
local name, addon = ...
 
local embed = addon:LibInit("zzCommon-Base", 32, {'RegisterFunc','HandleFunclist','round','split','classcolor','colorize','Print','buildMoneyString','RegisterEventThrottle','RGB2Hex','Hex2RGB','sortArray','IsTwink','getItemId','itemInfo','startup'})
local embed = addon:LibInit("zzCommon-Base", 33, {'RegisterFunc','HandleFunclist','round','split','classcolor','colorize','Print','buildMoneyString','RegisterEventThrottle','RGB2Hex','Hex2RGB','sortArray','IsTwink','getItemId','itemInfo','startup'})
if(type(embed) ~= 'function') then return end
 
local table = table
66,7 → 66,7
 
local lib = {}
function lib:RegisterFunc(event,typ,func)
local f = CreateFrame("Frame",nil,self)
local f = CreateFrame("Frame")
if(type(event) == "table") then
for i = 1, #event do
f:RegisterEvent(event[i])
291,9 → 291,9
end
end
function lib:startup(name, childName, init, default, defaults)
if(name==childName) then
if(name==childName) then
local addon = self
self['frame'] = self:RegisterFunc({'PLAYER_LOGOUT','ADDON_LOADED','PLAYER_ENTERING_WORLD'},"OnEvent", function(self, event, arg1,...)
local addon = self:GetParent()
if(event=='ADDON_LOADED') then
if(arg1 ~= childName) then return end
addon['db'] = addon['db'] or LibStub("AceDB-3.0"):New(childName.."DB", nil, default)