Move Object in TList

BlitzMax Forums/BlitzMax Programming/Move Object in TList

ima747(Posted 2008) [#1]
I have a TList and I need to move 1 item up or down the list 1 place. My brain is failing me and I can't seem to even hack something ugly together that works. Any suggestions on how to accomplish this?


MGE(Posted 2008) [#2]
Have you researched the sort commands yet?


ima747(Posted 2008) [#3]
I was looking at SortList as an option but the list order is what I'm using for my item order, so to move something up or down, as I understand it, I would have to be able to compare two items to determine which goes above another, but the way I currently determine what is above something else is just it's order in the list so I would need a second way of tracking an item essentially to be able to shift it.


plash(Posted 2008) [#4]



ima747(Posted 2008) [#5]
oooo that looks like exactly what I need thank you!