View Single Post
10-13-21, 07:08 PM   #1
Khazak
A Murloc Raider
 
Khazak's Avatar
Join Date: Oct 2021
Posts: 4
How to show and hide frames

I am having difficulty with frames not properly showing and hiding.

Addon behavior can be seen here .

The intended behavior is to have the list show a list of user defined spells based on category. The list itself is populated properly, debug prints are all as expected.

The issue I'm having is with reusing each line. As I understand it, you can't delete frames. Only hide them. My idea is to then hide all the frames representing each line in the spell list, replace the text as needed with the new list, and then show the ones that got updated. This does not seem to be working. The first line overlays the new spell id text on top of the old, and none of the others get updated.
  • Is there a better way to change lists? Is there a way I can throw out the old list and make new frames for each list?
  • Why is Hide() not actually hiding the frames? The call goes through without error, and if I use /fstack I can manually hide the frame using its id. Do I need to do something to refresh the parent frame?

Code is here.

The debug prints are showing expected results, selecting a new list prints the right number of "hiding" and "setting existing row" messages, just none of the rows change except the first. If anything isn't clear I am happy to explain in more detail.

Last edited by Khazak : 10-13-21 at 07:12 PM.
  Reply With Quote