Post
by dunbarx » Wed Jul 03, 2013 3:57 am
Hi.
The keys of an array in LiveCode are associated with their elements, but the order is not preserved. in other words, if you create an array from data which is sorted a certain way, you may no longer find it sorted once you examine the array, or if you then extract the data from that array. All the associations will be intact, just not the order. When you deconstruct the array using the "combine" command to change the array variable into an ordinary variable, then you can sort in any way you wish.
In the end, the usefulness of sorting generally is only pertinent once the data is exported or displayed somewhere, either in a variable or in a container like a field. Sort when you need to at those times.
Craig Newman