Sorting array

Dennis Brown see3d at writeme.com
Mon Dec 19 17:42:28 EST 2005


You can't sort an array.  The internal sorted format is undefined.   
You need to create a key that gives you the order you want each  
element to be in --like time code.

Depending on the type of operations you want to perform, the lines of  
items might be better --you can sort by different items.

Dennis

On Dec 19, 2005, at 5:13 PM, Brad Borch wrote:

> I have about 300 items for a timeline, each with a start date, an  
> end date, some simple classification, a title, and some text  
> content. I'm building a Rev back end to manage the timeline events,  
> and a flash front end to create an animated timeline. Flash will be  
> reading what is essentially a tab-delimited database.
>
> First, am I better off dropping text into an array in Rev to edit  
> it, or simply sorting and managing the text as a big hunk of text?
>
> Second, if the array is better, how do I sort the array? (I've  
> already built the Rev tool to split the text into the array). I've  
> tried "sort gMyEvents numeric by item 1 of each" (after defining  
> the itemDelimiter as tab). Is there a simple way to sort an array?  
> Am I missing something?
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list