Sorting array

Jim Ault JimAultWins at yahoo.com
Mon Dec 19 17:47:52 EST 2005


On 12/19/05 2:13 PM, "Brad Borch" <brad at activadesign.com> wrote:
> 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?

I would recommend you keep using the tab as a delimiter and do the
following:
<sorting using datetime>
set the itemdel to tab
sort gMyEvents datetime by item 1 of each

Unless you need something that an array can do that simple lines with a
single delimiter cannot, use what Rev does very well (words, items, lines)

<editing as a big hunk of text>
This can take various forms using one or more fields, list field(s), or
table formatted fields.
Questions:
Do you want to copy and paste the whole text block from another program?
? read a text file from the hard drive
? edit one line at a time
? edit a column
? have Rev automatically set the start times given the end times of the line
before, or enter these manually (or conversely, set the end times)
? assume that empty categories are the same as the line before
? allow drag and drop, or even smart-drag-and-drop
? one-click duplicate prev line, insert new line, delete selected lines, etc
? automatic renumbering

In every case, arrays are not directly editable, but would be
packed/unpacked into fields for editing.

I do the same thing you are setting up, with Rev > text > SWF loadVars

Jim Ault
Las Vegas


On 12/19/05 2:13 PM, "Brad Borch" <brad at activadesign.com> 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