Why not sort the hilitedLines first?

Thanks Jan but, the line order has to
remain as is, or else my users
would get distracted/confused by
the visual effect.

Nicolas,

Jan's handler doesn't sort the actual contents of your list, just a copy of the hilitedLines. So, the list's line order and its display remain unaffected. The user will simply see their selected lines disappear, which is the desired behavior.

I remember being totally stumped in the early HyperCard days by the same problem - how to delete a container's lines in a repeat loop? It didn't seem possible, because as soon as you deleted a line the line numbers would change and you'd end up deleting lines you should have kept. I tried all sorts of complex gyrations, including actually inserting numbers before the lines! Then a kind soul, Steve Nelson I think, advised, "Just work backwards." So simple! It taught me a bigger lesson. Sometimes a solution appears when you just flip the problem upsidedown.

Jim Lambert

##
put the hilitedLines of me into tHilitedLines
sort items of tHilitedLines numeric descending
repeat for each item tLineNumber in tHilitedLines
 delete line tLineNumber of me
end repeat
##


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to