I am trying to create an addon for WoW and I have UI window created that has an inputbox and an add button. I want someone to be able to type a number into that box, hit add and the number with a blank inputbox to the right of the number appear in the window below in a list. I can get the add button to add the number to a savedvariable on logout, but I can't get it to display in the window. Any help would be greatly appreciated! This is the code I have so far for the add button.
PIConfig.addBtn = CreateFrame("Button", nil, PIConfig, "GameMenuButtonTemplate");
PIConfig.addBtn:SetPoint("Center", PIConfig, "Center", 40, 50);
PIConfig.addBtn:SetSize(80, 30);
PIConfig.addBtn:SetText("Add");
PIConfig.addBtn:SetNormalFontObject("GameFontNormal");
PIConfig.addBtn:SetHighlightFontObject("GameFontHighlight");
PIConfig.addBtn:SetScript("OnClick", function(self, button, down)
if InputBox10 ~= "" then
itemNum = InputBox10:GetNumber()
end
table.insert(perList, itemNum)
for i,v in ipairs(perList) do
PerItList[v] = {
["itemName"] = GetItemInfo(v),
["num1"] = 0,
["num2"] = 0
}
end
end)