Quantcast

Change any stray instances of getglobal to _G

James Whitehead II [10-14-10 - 13:08]
Change any stray instances of getglobal to _G
Filename
BindConfig.lua
OptionsPanel.lua
diff --git a/BindConfig.lua b/BindConfig.lua
index ba5e218..4b7e3e2 100755
--- a/BindConfig.lua
+++ b/BindConfig.lua
@@ -101,7 +101,7 @@ function CliqueConfig:HijackSpellbook()
     self.spellbookButtons = {}

     for idx = 1, 12 do
-        local parent = getglobal("SpellButton" .. idx)
+        local parent = _G["SpellButton" .. idx]
         local button = CreateFrame("Button", "CliqueSpellbookButton" .. idx, parent, "CliqueSpellbookButtonTemplate")
         button.spellbutton = parent
         button:EnableKeyboard(false)
diff --git a/OptionsPanel.lua b/OptionsPanel.lua
index cfa3aa1..e3d5d0a 100644
--- a/OptionsPanel.lua
+++ b/OptionsPanel.lua
@@ -123,7 +123,7 @@ StaticPopupDialogs["CLIQUE_NEW_PROFILE"] = {
 	button2 = TEXT(CANCEL),
 	OnAccept = function(self)
 		local base = self:GetName()
-		local editbox = getglobal(base .. "EditBox")
+		local editbox = _G[base .. "EditBox"]
         local profileName = editbox:GetText()
         addon.db:SetProfile(profileName)
 	end,
@@ -135,11 +135,11 @@ StaticPopupDialogs["CLIQUE_NEW_PROFILE"] = {
 	hasEditBox = 1,
 	maxLetters = 32,
 	OnShow = function(self)
-		getglobal(self:GetName().."Button1"):Disable();
-		getglobal(self:GetName().."EditBox"):SetFocus();
+		_G[self:GetName().."Button1"]:Disable();
+		_G[self:GetName().."EditBox"]:SetFocus();
 	end,
 	EditBoxOnEnterPressed = function(self)
-		if ( getglobal(self:GetParent():GetName().."Button1"):IsEnabled() == 1 ) then
+		if (_G[self:GetParent():GetName().."Button1"]:IsEnabled() == 1) then
             local base = self:GetParent():GetName()
             local editbox = _G[base .. "EditBox"]
             local profileName = editbox:GetText()
@@ -148,12 +148,12 @@ StaticPopupDialogs["CLIQUE_NEW_PROFILE"] = {
         self:GetParent():Hide();
 	end,
 	EditBoxOnTextChanged = function (self)
-		local editBox = getglobal(self:GetParent():GetName().."EditBox");
+		local editBox = _G[self:GetParent():GetName().."EditBox"];
 		local txt = editBox:GetText()
 		if #txt > 0 then
-			getglobal(self:GetParent():GetName().."Button1"):Enable();
+			_G[self:GetParent():GetName().."Button1"]:Enable();
 		else
-			getglobal(self:GetParent():GetName().."Button1"):Disable();
+			_G[self:GetParent():GetName().."Button1"]:Disable();
 		end
 	end,
 	EditBoxOnEscapePressed = function(self)