Would appreciate some help please, this is probably a simple problem which someone on this forum could resolve instantly. I'm currently learning.
I'm using the AceGUI libraries for creating the GUI frames, I've created a dropdown box but I'm having difficulty releasing the widgets correctly.
I've updated my code to
Code:
widgetName:ReleaseChildren()
and
Code:
AceGUI:Release(widgetName)
but I get multiple errors for "Attempt to Release Widget that's already been released". I'm unsure what the correct way of releasing the widget within a dropdown box is.
Scenario:
When I select a dungeon, I've added a test label with some info. But boss 1 and 2 has a Lua table with details. But I'm unable to release the container with the "Testing hello.." to then display the correct information based on the selection.
Code snippet of the bossDropDown:
Code:
bossDropDown:SetCallback("OnValueChanged", function (self, event, value)
if value == "0" then
adventureGuideFrameTab:SelectTab("tab2")
elseif value == "1" then
local textlabel = AceGUI:Create("Label")
textlabel:SetFont("Fonts\\FRIZQT__.TTF", 12, nil)
textlabel:SetText(encounterJournal[48][1])
textlabel:SetFullWidth(true)
textlabel:SetFullHeight(true)
scrollcontainer:AddChild(textlabel)
elseif value == "2" then
local textlabel = AceGUI:Create("Label")
textlabel:SetFont("Fonts\\FRIZQT__.TTF", 12, nil)
textlabel:SetText(encounterJournal[48][2])
textlabel:SetFullWidth(true)
textlabel:SetFullHeight(true)
scrollcontainer:AddChild(textlabel)
end
end)
end)