sort stack by short id of this card

Ken Norris (dialup) pixelbird at interisland.net
Sun Feb 24 21:19:01 EST 2002


> on 2/24/02 7:48 AM, Stgecft at aol.com at Stgecft at aol.com wrote:

>> I have a stack I am scripting for work.  For years I have been using this in
>> Hypercard.  It is a "Form" made of six cards (designed to print cards 1 &2 on
>> one page, cards 3 & 4 on the next page and cards 5 &6, on the last page). I
>> have rewriten it in transcript and am now setting it to copy itself, and sort
>> so that I have each form in order by field "Order Number".  (on mouseUp....go
>> first .... repeat 6..new card....go next........sort stack by short id of
>> this card)
>> 
>> Everything works fine....untill I got to Card ID 10000. Now card id 10000 has
>> decided it wants to be first in the card order.

on 2/24/02 8:24 AM, Rob Cozens at rcozens at pon.net wrote:

> I frankly don't understand why this works at all.  You say you want the
> cards in order by field "Order Number" but sort the stack by the short id
> of each card. ??
----------
Rob, I'm with you. I'll be writing a new invoice form for my outdoor
business, which will be similar to Mr. Stgecft's, which I'll start outlining
in a day or two, but sorting by ID number is not a consideration at all.

I don't know what the card limits are, or even if there are any limits, in
RR, but sorting by cd ID number makes little sense to begin with. If you
ever accidentally deleted or copied a card somewhere in the middle of the
stack, you could fix the problem by inserting a new one in the correct
position, but, if you tried to sort by ID, even in HC, the whole sequence
would go to heck in a handbasket. I assume that in RR, like HC, card ID's
are (or need to be, in RR?) unique, regardless of where the card is, so
sequencing card ID's in a stack would HAVE to be totally intentional. That'd
be cross-stack dedicated linear. Card ID's are mostly for revisiting (as in
Back or Go Recent, but under script control) by storing ID numbers in a
variable(s), so you can revisit any card, or selection of cards, from any
other card in any stack.

Are the cards grouped in any way?

It's seems unwise to sort the cards in groups of 6 using their ID numbers,
except by total dedication. Virtually ANY card additions or deletions in ANY
stack could throw it all off.  In this case, they should be sorted by order
number. Each order number would automatically bring up the first card of the
group with that order number (in the same stack), regardless of ID numbers.

But in RR, might intentionally group them by order number as a name. That
way, if ever a decision is made to have more thn 6 cards in a group, it
wouldn't matter. Just a thought.

As to the stack starting to renumber itself at card ID 10000, I'm just not
sure. Seems like it couldn't be coincidence with such an ID number, doesn't
it? Could it be a memory problem? Maybe MC/RR allocates card ID memory
allowances in blocks of 100 or something similar.

Best regards,
Ken N.








More information about the use-livecode mailing list