Newbie Question
Dick Kriesel
dick.kriesel at mail.com
Wed Mar 28 04:11:24 EDT 2007
On 3/28/07 12:49 AM, "Simon HARPER" <simon.harper at manchester.ac.uk> wrote:
> 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
Try this, Simon:
on mouseUp
put field "listCats" into tListCats
put the hilitedlines of field "listCats" into tHilitedLines
repeat with i = number of items in tHilitedLines down to 1
delete line (item i of tHilitedLines) of tListCats
end repeat
put tListCats into field "listCats"
end mouseUp
Also, try using the dictionary. The entry for "repeat" will help you.
-- Dick
More information about the use-livecode
mailing list