Hi, I am trying to update an addon that was abandoned in 2011.
It was working till patch 8.0 though.
I think there are 2 main problems.
SetText doesn't seem to be sending over any text.
Code:
autoMacroOptionsTitle:SetText(autoMacroStrings.Title);
And I am not sure it is reading all the channels.
My debuff only shows channel
Code:
function ChannelsMenu_Initialize()
local channels = { GetChannelList(); }
local channels_user = {};
local iter = 0;
for i,title in ipairs(channels) do
if i % 2 ~= 0 then
iter = iter + 1;
channels_user[iter] = title;
else
channels_user[iter] = channels_user[iter] .. ". " .. title;
ShowDebug("Found channel " .. channels_user[iter]);
end
end
for i, title in ipairs(channels_user) do
local info = UIDropDownMenu_CreateInfo();
info.text = title;
info.value = i;
info.owner = ChannelsDropdown;
info.func = function(self) OnChannelsMenuClick(self) end;
UIDropDownMenu_AddButton(info);
end
end
function OnChannelsMenuClick(self)
UIDropDownMenu_SetSelectedValue(self.owner, self.value);
local menuText = UIDropDownMenu_GetText(ChannelsDropdown);
ShowDebug("Selected channel: [" .. self.value .. "] : " .. menuText);
autoMacroOptionsChannelButton:SetText(menuText);
end
I have uploaded the entire addon to Github aswell:
https://github.com/DamienShahan/autoMacro/tree/master
I would greatly appreciate any help.