Newbie Question

Simon HARPER simon.harper at manchester.ac.uk
Wed Mar 28 03:49:07 EDT 2007


Hi there,
I'm trying to delete the selected rows in a list field - however to  
make this work I have to do it in reverse so deleting

2,3 out of say 1-5 doesn't work is line 3 is removed incorrectly -  
therefore I need to remove 3, 2

I'm trying this (when the 'delete' button is pressed) code fragment  
as part of the delete button, however,
   sort items of tLineList descending of each

doesn't seem to do anything, I wonder if you cold help me with what  
I'm getting wrong here - also is there a 'in reverse' option for the  
repeat loop?

on mouseUp
   put the hilitedlines of field "listCats" into tLineList
   split tLineList by comma
   sort items of tLineList descending of each
   repeat for each element tLineNumber in tLineList
     delete line tLineNumber of field "listCats"
   end repeat
   sort field "listCats" ascending
end mouseUp



Cheers
Si.

====
Simon Harper
2.44 Kilburn Building
University of Manchester (UK)

Pri: simon.harper at manchester.ac.uk
Alt: sharper at cs.man.ac.uk





More information about the use-livecode mailing list