Getting Contents of Multiple fields in order (Left-to-Right&Down)

J. Landman Gay jacque at hyperactivesw.com
Sat Jan 29 13:43:14 EST 2011


On 1/29/11 6:12 AM, Jim Ault wrote:
> Assuming all fields on a card are the target fields to sort and combine
>
> on sortFlds
> repeat with k = 1 to the number of fields
> put the rect of field k after fieldList
> put comma & k after fieldList
> put cr after fieldList
> end repeat
> sort fieldList numeric by item 2 of each -- Y
> sort fieldList numeric by item 1 of each -- X
>
> repeat for each line LNN in fieldList
> put fld (item 5 of LNN) after tWholeenchilada
> put cr after tWholeenchilada
> end repeat
> put tWholeenchilada into msg box
> end sortFlds
>
> -- in the second repeat loop you could use ...
> -- put item 5 of LNN into fldNum
> -- put fld fldNum after tWholeenchilada
>

I tried something almost identical and it didn't work, so I was waiting 
to see if anyone else could come up with a solution. The task is harder 
than you'd think at first.

For testing, stagger the fields a little bit so their tops and lefts 
aren't aligned in any way.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list