changeset 148:106c1523777e 2010-10-16

Fixed references to 'this' which Blizzard removed in 4.0.1
author Asa Ayers <Asa.Ayers@Gmail.com>
date Sat, 16 Oct 2010 07:35:50 -0700
parents 1fb5ee067a50
children c949a0f26d9e
files CHANGELOG.txt Modules/Crafting.lua Modules/DisplayInvested.lua
diffstat 3 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- 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  <Asa.Ayers@Gmail.com>
+
+- Fixed references to 'this' which Blizzard removed in 4.0.1
+
 2010-10-13  Asa Ayers  <Asa.Ayers@Gmail.com>
 
 - Better solution for item links.
--- 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)
--- 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)