Button not showing on frame
I'm a beginner when it comes to addon development...
I created a simple addon with a frame and a button but the button is not showing up on the frame. I've looked at a few other examples but can't see what I'm doing wrong. I have bug sack/bug grabber enabled and not seeing any errors. Any help is much appreciated. Here is my lua file. Lua Code:
|
Code:
frame:Hide() If you start off commenting out the Hide() until you've finished creating the frame and getting it working properly and then worry about the mechanics of showing/hiding it might prove useful. |
Works better but... question about when to release a widget
Thanks for the help. Moving the :hide call fixed the button issue.
I also commented out the line: --frame:SetCallback("OnClose", function(widget) AceGUI:Release(widget) end) and now the button shows up with when the frame is opened and closed which makes me wonder when I should be concerned about release the widgets? Do most addons leave the frame open? Lua Code:
|
The game doesn't "destroy" widgets (frames, buttons etc). They remain until you /reload or logout.
I don't use Ace so I can only guess that at what releasing does, possibly some internal pool mechanaism for re-use. That said, just hiding/showing the frame to start with until you get more understanding of how Ace does things won't hurt. Putting code blocks around code will make it more readable (the # or blue lua buttons above the edit box) |
Thanks again
The code looks so much better.
I really appreciate all the help you provide!! |
All times are GMT -6. The time now is 04:15 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI