View Single Post
05-05-23, 07:40 AM   #2
fooxytv
A Murloc Raider
Join Date: Apr 2023
Posts: 4
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)
Attached Thumbnails
Click image for larger version

Name:	upload1.JPG
Views:	102
Size:	31.6 KB
ID:	9815  Click image for larger version

Name:	upload2.JPG
Views:	101
Size:	29.4 KB
ID:	9816  Click image for larger version

Name:	upload3.JPG
Views:	93
Size:	26.4 KB
ID:	9817  

Last edited by fooxytv : 05-05-23 at 07:49 AM.
  Reply With Quote