looking for a smart approach to "sort" an array

Mike Bonner bonnmike at gmail.com
Fri May 5 14:48:42 EDT 2017


True,  wasn't sure the field would still be available. I think the O.P.
mentioned  rebuilding the list in user order at a later time (as in from a
later program run) by loading the array data from a file.  By storing the
list from the field as part of the array data, it carries the user index
along with the data being indexed.  (could store the list many ways, but
all of them require a way to actually save the list between runs, if I
understand what I read)


On Fri, May 5, 2017 at 12:36 PM, hh via use-livecode <
use-livecode at lists.runrev.com> wrote:

> > Mike B. wrote:
> > repeat for each line tKey in myArrayA["sortedWords"]
> >   -- do whatever with each one myArrayA[tKey].....
> > end repeat
>
> Why administrate another object while you have already one?
> One could rebuild to string from array and sort in one step:
>
> put fld "myListField" into mySortList
> repeat for each line L in mySortList
>     -- do whatever with each one myArrayA[L] ...
> end repeat
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list