KwTools

Intro
kwTools is a set of different libraries which support the addon development.

The libraries are precompiled Lua chunks and need LibStub to work properly.

Example: local kwDispatcher = LibStub("kwDispatcher") Some of the libraries depend on each other.

Dependencies have to be loaded first in your .toc file.

General dependencies: string.extension, table.extension, LibStub

Example: kwTimer depends on kwDispatcher Libs\string.extension.lua Libs\table.extension.lua Libs\LibStub.lua Libs\kwDispatcher.lua Libs\kwTimer.lua Author: Kwitsch

Download: http://rom.curseforge.com/addons/kwtools/

kwDispatcher

 * kwDispatcher.RegDEvent(addonName, func, events)
 * kwDispatcher.RemDEvent(addonName, events)
 * kwDispatcher.RegTEvent(addonName, func, events)
 * kwDispatcher.RemTEvent(addonName, events)
 * kwDispatcher.RegUpdate(addonName, func)
 * kwDispatcher.RemUpdate(addonName)
 * kwDispatcher.RegThread(func)

kwTimer
Dependencies: kwDispatcher
 * kwTimer.Wait(seconds, func, id, params)
 * kwTimer.Remaining(id)
 * kwTimer.SetTime(id, seconds)
 * kwTimer.Stop(id)

kwIO

 * kwIO.Print(msg, color, frameName)
 * kwIO.Error(msg, addon, frameName)
 * kwIO.Locales(addonName)

kwUI
Dependencies: kwDispatcher
 * kwUI.HandlePopup(PopupName, PopupChoice)
 * kwUI.HideChat(chatName)

kwPlayer

 * kwPlayer.GetFriendList
 * kwPlayer.GetGuildList
 * kwPlayer.IsFriend(playerName)
 * kwPlayer.IsGuildMember(playerName)
 * kwPlayer.PartyNumber(playerName)
 * kwPlayer.GetPlayerInfo(playerId)
 * kwPlayer.ReturnPlayerInfo(playerId)

kwHook

 * kwHook.Create(addonName, funcName, func)
 * kwHook.Delete(addonName, funcName)
 * kwHook.DisableOrig(funcName)

Credits
I like to thank the following addon authors for their great work which inspired me writing this libraries:
 * Alleris2_0
 * McBen
 * Mavoc
 * matif
 * Noguai