Code:
function SetEnabled(info, newValue)
UnitScanner_Settings["Bars"][self.CurrentBar]["enabled"] = newValue
local frm = "US_Frame" .. 1
if (newValue == true) then
frm:Show()
else
frm:Hide()
end
end
The reason that doesn't work is "frm" is assigned a string, you need to change it to get the actual object:
Code:
function SetEnabled(info, newValue)
UnitScanner_Settings["Bars"][self.CurrentBar]["enabled"] = newValue
local frm = _G["US_Frame" .. 1]
if (newValue == true) then
frm:Show()
else
frm:Hide()
end
end