I am almost finished with something that I am working on. However, I cannot for the life of me figure out how to sort a table from low to high. I probably did this a little wrong to begain with, but it works, besides me not figuring out how to sort the info.
What I have is a timer that has 5 possible bars. Sometimes only one is show sometimes all the way up to five are shown. I have five frames that are hidden unless there is info to be displayed in them. However, I would like the bars to be ordered top to bottom from lowest timer value to highest timer value, with the nil valued frames hidden at the bottom.
Here is my table structure.
Code:
myaddon.framestuff {
Frame1 = {
Timer = var
Target = var
Subtract = var
Who = var
}
Frame2 = {
Timer = var
Target = var
Subtract = var
Who = var
}
Frame3 = {
Timer = var
Target = var
Subtract = var
Who = var
}
Frame4 = {
Timer = var
Target = var
Subtract = var
Who = var
}
Frame5 = {
Timer = var
Target = var
Subtract = var
Who = var
}
}
So basically what would have to happen is I would have to have a function go through and see what frame.Timer values are and transfer the info to another frame. However, I am probably way off on my thinking.
Thanks to whoever takes the time to read this!
--Travis (some gnome mage)