- fixed the mirror bar: changed function declaration "class.new" to "class:new" in IceCore_CreateClass so that "self" doesn't get included in ... when init is called. this was causing an off-by-one error in the order of parameters passed to mirrorbar's "init" method and surprisingly didn't break anything else (looks like judicious use of 'ifs' in some defensive coding saved the rest of the modules); thanks to mitch0 for the report

- added an argument to IceElement's init function that allows modules to skip the registration with the core. mirrorbars need this since they are created on demand and not saved with the rest of the bars
This commit is contained in:
Parnic
2010-09-18 04:04:30 +00:00
parent 250adfc2db
commit 0b3ec943b0
4 changed files with 8 additions and 10 deletions

View File

@ -18,7 +18,7 @@ MirrorBar.prototype.label = nil
-- Constructor --
function MirrorBar.prototype:init(side, offset, name, db)
MirrorBar.super.prototype.init(self, name)
MirrorBar.super.prototype.init(self, name, true)
self.settings = db
self.moduleSettings = {}
self.moduleSettings.side = side
@ -29,10 +29,6 @@ function MirrorBar.prototype:init(side, offset, name, db)
self.moduleSettings.barVerticalOffset = 0
-- avoid nil warnings here
self.moduleSettings.myTagVersion = IceHUD.CurrTagVersion
-- unregister the event superclass registered, we don't want to register
-- this to the core
self:UnregisterEvent(IceCore.Loaded)
end