.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
MCKALISTAIR
Posts: 4
Joined: Wed Dec 17, 2014 8:03 pm

.

Post by MCKALISTAIR » Sun Mar 01, 2015 9:39 pm

Here's the situation. I have a text file on my desktop (Mac) and am reading it to a field on a card. The data that it reads consists of a name and a number separated by a dash ( for example, Dave - 100) I was wondering if there is a way I could sort the list so the highest number is at the top?

Many thanks
Last edited by MCKALISTAIR on Sun Mar 08, 2015 2:40 pm, edited 1 time in total.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Sorting using text files

Post by Dixie » Sun Mar 01, 2015 9:47 pm

Code: Select all

on mouseUp
   set itemdel to "-"
   sort lines of fld "whateverItsNameis"  numeric descending by item 2 of each
end mouseUp

Post Reply