Sorting cards problem, and a link
Alex Tweedly
alex at tweedly.net
Sat Jan 1 20:25:41 EST 2022
Not sure if I understand it properly, but ....
cards 1 and 2 (i.e. the index and the current choice) do not have a
field "title"
If I do a **sort card by field "title" ** then the cards come out
unsorted (or improperly sorted, not sure).
I added a field "title" to each of the first 2 cards, then it seems to
sort properly.
It's getting late, so I can't look at it more tonight - but I suspect
the "sort cards" is crapping out somehow / somewhere when it hits a "No
such object" error on the missing field of a card.
I don't know if you can simply add an invisible, disabled field "title"
on those extra cards (as I did for this simple test), or whether you
need to set the "marked" for only the relevant cards ...
Alex.
On 01/01/2022 23:45, J. Landman Gay via use-livecode wrote:
> Hi Alex, thanks so much for volunteering. There's a Dropbox transfer
> here:
>
> <https://www.dropbox.com/t/48p3udCRAwcRXnWb>
>
> The stack is huge, 8K+ cards. I told him he needs a database but he
> doesn't want to go there yet. In general it seems to work okay, at
> least for now. The stack was created 30 years ago in HC, he imported
> it to SuperCard, and now needs to move to LC. The original scripts
> were very minimal, I added a few more and cleaned up the visual
> appearance. I wrote an export script that he ran in SuperCard, and
> then imported the file to the new LC stack, creating cards along the way.
>
> The HC and SC stacks sorted correctly. Only LC fails.
>
> The first 13 cards always sort to the front of the stack which is
> where he wants them. They shouldn't, but they do, so okay. Go to one
> of the recipe cards and choose to sort by category.
>
> - The first 13 cards have no category so they don't move. Good.
> - The next cards, up to about 50, remain sorted by title
> - The following cards do sort by category, with each category
> alphabetical (good)
>
> Sort by title seems to work okay. If you can't duplicate the above,
> sort by title first and then by category.
>
> My question is, why don't "The Cheese Board" and "The Fruit Bowl" sort
> to the Ts when sorting by title? We don't want them to, but how come
> they don't? If you notice that Breakfast is out of order, it's because
> there's a space in front of the category name. He did that on purpose
> to keep it at the front.
>
> I checked for spaces and other invisible characters in the title and
> category fields and didn't find any.
>
> It's just weird. Thanks very much for taking a look, I'm at a loss.
>
> Jacque
>
More information about the use-livecode
mailing list