# HG changeset patch # User Asa Ayers # Date 1287239750 25200 # Node ID 106c1523777e75bf2d0cd1d99db607d50a4fd153 # Parent 1fb5ee067a50eff70b2d58a51da928adc9ab6b1a Fixed references to 'this' which Blizzard removed in 4.0.1 diff -r 1fb5ee067a50 -r 106c1523777e CHANGELOG.txt --- a/CHANGELOG.txt Wed Oct 13 21:47:20 2010 -0700 +++ b/CHANGELOG.txt Sat Oct 16 07:35:50 2010 -0700 @@ -1,3 +1,7 @@ +2010-10-16 Asa Ayers + +- Fixed references to 'this' which Blizzard removed in 4.0.1 + 2010-10-13 Asa Ayers - Better solution for item links. diff -r 1fb5ee067a50 -r 106c1523777e Modules/Crafting.lua --- a/Modules/Crafting.lua Wed Oct 13 21:47:20 2010 -0700 +++ b/Modules/Crafting.lua Sat Oct 16 07:35:50 2010 -0700 @@ -274,10 +274,10 @@ btnProcess:SetPoint("BOTTOMRIGHT", craftingContent, 0, 0) btnProcess:RegisterForClicks("LeftButtonUp"); - local function UpdateProcessTooltip(btn) + local function UpdateProcessTooltip() local data = ItemAuditor:GetCraftingRow(1) if data then - GameTooltip:SetOwner(this, "ANCHOR_CURSOR") + GameTooltip:SetOwner(btnProcess, "ANCHOR_CURSOR") GameTooltip:SetText(format('Create %sx%s', data.link, data.queue)) GameTooltip:Show() end @@ -487,6 +487,7 @@ end local row = 1 + getQueueLocation() for i = 1, numTradeSkills do local itemLink = GetTradeSkillItemLink(i) diff -r 1fb5ee067a50 -r 106c1523777e Modules/DisplayInvested.lua --- a/Modules/DisplayInvested.lua Wed Oct 13 21:47:20 2010 -0700 +++ b/Modules/DisplayInvested.lua Sat Oct 16 07:35:50 2010 -0700 @@ -23,24 +23,21 @@ OnAccept = function() skipCODTracking = true end, - EditBoxOnEnterPressed = function() - if ( getglobal(this:GetParent():GetName().."Button1"):IsEnabled() == 1 ) then - getglobal(this:GetParent():GetName().."Button1"):Click() + EditBoxOnEnterPressed = function(self) + if ( self:GetParent().button1:IsEnabled() == 1 ) then + self:GetParent().button1:Click() end end, - EditBoxOnTextChanged = function () - local parentName = this:GetParent():GetName() - local editBox = getglobal( parentName.."EditBox"); - local value = editBox:GetText() - if validateMoney(value) then - getglobal(parentName.."Button1"):Enable(); + EditBoxOnTextChanged = function (self) + if validateMoney(self:GetText()) then + self:GetParent().button1:Enable() else - getglobal(parentName.."Button1"):Disable(); + self:GetParent().button1:Disable(); end + end, - EditBoxOnEscapePressed = function() - this:GetParent():Hide(); - ClearCursor(); + EditBoxOnEscapePressed = function(self) + self:GetParent().button2:Click() end, timeout = 0, hideOnEscape = 1, @@ -64,10 +61,8 @@ self.editBox:SetText(ItemAuditor:FormatMoney(price, '', true)) end - StaticPopupDialogs["ItemAuditor_NewPrice"].OnAccept = function() - local name = this:GetParent():GetName().."EditBox" - local button = getglobal(name) - local newValue = button:GetText() + StaticPopupDialogs["ItemAuditor_NewPrice"].OnAccept = function(self) + local newValue = self.editBox:GetText() newValue = parseMoney(newValue) local investedTotal, investedPerItem, numOwned = ItemAuditor:GetItemCost(link)