# HG changeset patch # User Flick # Date 1290209243 28800 # Node ID 9c0691e914884359c9f6fbe32386cce9adc8f25b # Parent 376c424900f01cf6b1aa207b7820269f7d0cf97f Don't autogenerate bar names diff -r 376c424900f0 -r 9c0691e91488 ReAction.lua --- a/ReAction.lua Fri Nov 19 14:33:45 2010 -0800 +++ b/ReAction.lua Fri Nov 19 15:27:23 2010 -0800 @@ -135,18 +135,12 @@ function ReAction:CreateBar(name, config, ...) local profile = self.db.profile - if name then - if self.bars[name] then - self:UserError(format(L["ReAction: name '%s' already in use"],name)) - return nil - end - else - local prefix = L["Bar "] - local i = 1 - repeat - name = prefix..i - i = i + 1 - until self.bars[name] == nil + name = tostring(name) + if not name or name == "" then + error("ReAction:CreateBar() - bar name string required") + elseif self.bars[name] then + self:UserError(format(L["ReAction: name '%s' already in use"],name)) + return nil end if type(config) == "string" then