Easy quick hypertalk coding question

william humphrey shoreagent at gmail.com
Mon Apr 14 19:59:37 EDT 2008


Eric

THANKS A BUNCH!
This is just what I needed as there are many cards each with an index field
with a number in it.  I should have been more specific but I was bamboozled
that we couldn't just "sort the cards by fld x" like in hypercard.

I am doing this to collect data from legacy hypercard stacks that will be
exported to SQLite. The collection of data involves lots of cleaning things
up.

Bill


On Mon, Apr 14, 2008 at 1:13 PM, Eric Chatonet <
eric.chatonet at sosmartsoftware.com> wrote:

> Bonjour William,
>
>
> > >
>
> function HigherValue pCdNumber
>  local temp
>
> To set all cds in the stack:
>
> repeat with i = 1 to the number of  cards
>  set the uIndex of cd i to HigherValue(i) --
> end repeat
>
> You can run this code at any moment :-)
> And you have now a custom property named uIndex that keeps the max value
> of each index field
> Then you can 'sort cards [direction] [sortType] by the uIndex of this cd'
>
> About to find duplicates, assuming you want to search the custom property
> set above:
>
> function DuplicatedCards
>  local tIndexList ,tDuplicates
>  -----
>  repeat with i = 1 to the number of  cards
>    put the uIndex of this cd & cr after tIndexList
>    if the uIndex of cd i is among the lines of tIndexList then
>      put the short name of this cd & cr after tDuplicates
>  end repeat
>  delete char -1 of tDuplicates
>  return tDuplicates
> end DuplicatedCards
>
>
>
>
> _______________________________________________
> 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
>



-- 
http://www.bluewatermaritime.com



More information about the use-livecode mailing list