From 9452cd3129ab0fdfed2644c75789a91ba622e859 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Thu, 14 Oct 2010 14:08:20 +0100 Subject: [PATCH] Change any stray instances of getglobal to _G --- BindConfig.lua | 2 +- OptionsPanel.lua | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) 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) -- 1.7.9.5