So I am trying to write my first addon, it would just list a table of results 2 columns on the tab.
My initial idea was to have next and previous buttons to look through the results.
But I have since discovered there is a scroll frame, so was wanting to use a scroll frame instead.
The table itself will have 1 row added to the results for each day that the character was logged into.
A scroll frame should be ok right if it had a lot of data, as in a year or more?
Lua Code:
local TabName="AMD";
local TabID=CharacterFrame.numTabs+1;
local Tab=CreateFrame("Button", "$parentTab"..TabID, CharacterFrame, "CharacterFrameTabTemplate", TabID);
PanelTemplates_SetNumTabs(CharacterFrame, TabID);
Tab:SetPoint("LEFT", "$parentTab"..(TabID-1), "RIGHT", -16, 0);
Tab:SetText(TabName);
-- Tab:SetID(TabID);
tinsert(CHARACTERFRAME_SUBFRAMES, "AMD_TabOnCharacterFrame");
hooksecurefunc("CharacterFrameTab_OnClick", function(self, button)
if self:GetID() == TabID then
ToggleCharacter("AMD_TabOnCharacterFrame")
end
end)
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ http://wowprogramming.com/FrameXML/UI.xsd">
<Frame name="AMD_TabOnCharacterFrame" parent="CharacterFrame" frameStrata="HIGH" enableMouse="true" movable="true" setallpoints="true" id="4">
<Size x="206" y="580"/>
<Frames>
<Frame name="$parent_History" parent="AMD_TabOnCharacterFrame">
<Size x="300" y="325"/>
<Anchors>
<Anchor point="CENTER" relativePoint="CENTER" relativeTo="CharacterFrame"/>
</Anchors>
<Frames>
<Frame name="$parent_ScrollFrame" parent="AMD_TabOnCharacterFrame_History" inherits="UIPanelScrollFrameTemplate">
</Frame>
</Frames>
<Layers>
<Layer level="OVERLAY">
<FontString name="History_Title" parentKey="History_title" inherits="GameFontNormal">
<Color r="1" g="1" b="1" a="1"/>
<Anchors>
<Anchor point="TOP">
<Offset x="0" y="20"/>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
</Frames>
</Frame>
</Ui>
This gives me errors and I have no idea what they mean.
Code:
Interface/SharedXML/SecureUIPanelTemplates.lua:64: attempt to call method 'SetVerticalScroll' (a nil value)
Code:
Interface/SharedXML/SecureUIPanelTemplates.xml:120 Frame AMD_TabOnCharacterFrame_History_ScrollFrame: Unknown script element OnScrollRangeChanged
Code:
Interface/SharedXML/SecureUIPanelTemplates.xml:121 Frame AMD_TabOnCharacterFrame_History_ScrollFrame: Unknown script element OnVerticalScroll