yeah that was my first thought aswell :/ but no luck in terms of changing it to dropdownName, this is the "updated" code, which now throws errors about self
Code:
dropdownName = "optionDropdownRedirect"..NumOptions
dropdownName = CreateFrame("Frame", "optionDropdownRedirect"..NumOptions, CategoryFrame, "UIDropDownMenuTemplate")
dropdownName:ClearAllPoints()
dropdownName:SetPoint("TOPLEFT", 320, distanceTop + 4)
local function dropdownName_OnClick(self)
UIDropDownMenu_SetSelectedID(dropdownName, self:GetID())
ErrDB.ErrRdr[i] = self:GetText()
end
local function initialize(self, level)
local info = UIDropDownMenu_CreateInfo()
for k,v in pairs(RedirectOptions) do
info = UIDropDownMenu_CreateInfo()
info.text = v
info.value = v
info.func = function() dropdownName_OnClick() end
UIDropDownMenu_AddButton(info, level)
end
end
UIDropDownMenu_Initialize(dropdownName, initialize)
UIDropDownMenu_SetSelectedName(dropdownName, ErrDB.ErrRdr[i])
i fear it's something really simple but i've only just started programming addons after going a year without programming a single thing, so getting back in shape takes time