Quantcast

Bug fix. Text widgets should work again.

Scott Sibley [10-20-10 - 22:27]
Bug fix. Text widgets should work again.
Filename
Modules/Texts/Texts.lua
diff --git a/Modules/Texts/Texts.lua b/Modules/Texts/Texts.lua
index 264f856..ccf19d7 100644
--- a/Modules/Texts/Texts.lua
+++ b/Modules/Texts/Texts.lua
@@ -57,12 +57,12 @@ local defaultWidgets = {
 	[1] = {
 		name = "Name",
 		enabled = true,
-		frameName = "StarTipTextName",
 		value = [[
 if not UnitExists(unit) then return end
 return '--' .. select(1, UnitName(unit)) .. '--'
 ]],
 		color = [[
+_G.StarTip:Print(unit)
 if UnitIsPlayer(unit) then
     return ClassColor(unit)
 else
@@ -327,13 +327,13 @@ local new, del
 do
 	local pool = {}
 	local i = 0
-	function new(name, parent, background)
+	function new(background)
 		local text = next(pool)

 		if text then
 			pool[text] = nil
 		else
-			local frame = CreateFrame("Frame", name, parent)
+			local frame = CreateFrame("Frame")
 			frame:SetParent(UIParent)
 			if background then
 				frame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
@@ -406,7 +406,7 @@ function createTexts()
 			end
 			local widget = mod.texts[v]
 			if not widget then
-				local text = new(v.frameName, v.parent, v.background)
+				local text = new(v.background)
 				widget = WidgetText:New(mod.core, v.name, v, v.row or 0, v.col or 0, v.layer or 0, StarTip.db.profile.errorLevel, updateText)
 				text:ClearAllPoints()
 				text:SetParent("UIParent")