Hi guys
@ Fizzlemizz
Based on your post I changed the way my update worked.
I built a templist that from the DKChatlist so I was updating that instead.
Lua Code:
local function updateDeathKnightSpellChatList()
currentSpellList = {}
for k, v in pairs(DeathKnightSpellList) do
if v.spellID == VariableList.currentSpellID then
currentSpellList = v.spellChatList
end
end
FauxScrollFrame_Update(
DeathKnightChatScrollFrame,
#currentSpellList,
NumberList.scrollButtonNumber,
NumberList.scrollButtonHeight
)
for index = 1, NumberList.scrollButtonNumber do
offset = index + FauxScrollFrame_GetOffset(DeathKnightChatScrollFrame)
button = DeathKnightChatScrollFrame.buttons[index]
button.index = offset
if offset <= #currentSpellList then
button:SetText(currentSpellList[offset])
button:Show()
else
button:Hide()
end
end
end
That allowed me to use the following syntax;
Lua Code:
print("Test Print 1 - ", currentSpellList[self.index]) -- debug --
@Kanegasi
After I re-reading your first post again I realized you had already given me the answer when you said
The second button: DeathKnightSpellList[2].spellChatList[2]
So I changed the syntax to
Lua Code:
print("Test Print 2 - ", DeathKnightSpellList[1].spellChatList[self.index]) -- debug --
Both of these syntaxes now work.
Thanks for all of your help.