Mercurial > wow > reaction
changeset 36:52ac6db0c8ca
changed version print to include revision.
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Thu, 03 Apr 2008 20:38:11 +0000 |
parents | a4620a29a9cb |
children | 413f61e038b1 |
files | ReAction.lua |
diffstat | 1 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ReAction.lua Thu Apr 03 20:27:25 2008 +0000 +++ b/ReAction.lua Thu Apr 03 20:38:11 2008 +0000 @@ -15,14 +15,16 @@ ------ DEBUGGING ------ ReAction.debug = true +local dbprint if ReAction.debug then - ReAction.print = function(msg) + dbprint = function(msg) DEFAULT_CHAT_FRAME:AddMessage(msg) end - --seterrorhandler(ReAction.print) + --seterrorhandler(dbprint) else - ReAction.print = function() end + dbprint = function() end end +ReAction.dbprint = dbprint ------ LIBRARIES ------ local L = LibStub("AceLocale-3.0"):GetLocale("ReAction") @@ -117,8 +119,12 @@ LoadAddOn("ReAction_ConfigUI") m = ReAction:GetModule("ConfigUI") end - if m and type(m) == "table" and type(m[method]) == "function" then - m[method](m,...) + if m then + if type(m) == "table" and type(m[method]) == "function" then + m[method](m,...) + else + dbprint(("Bad call '%s' to options module"):format(tostring(method))); + end else ReAction:Print("Options module not found") end @@ -132,7 +138,7 @@ elseif option == "lock" then ReAction:SetConfigMode(false) else - ReAction:Print(ReAction.version) + ReAction:Print(("%3.1f.%d"):format(ReAction.version,ReAction.revision)) ReAction:Print("/reaction config") ReAction:Print("/reaction unlock") ReAction:Print("/reaction lock")