Re: Sorting cards problem solved

2022-01-06 Thread David V Glasgow via use-livecode
Hope I didn’t come over as sarcastic! Not at all. It all took me back to HC days and my astonishment at how powerful and fast searching and marking cards was… I was eagerly following the thread to learn more. > On 4 Jan 2022, at 6:55 pm, J. Landman Gay via use-livecode > wrote: > > On

Re: Sorting cards problem solved

2022-01-04 Thread J. Landman Gay via use-livecode
On 1/3/22 2:53 PM, David V Glasgow via use-livecode wrote: Please let me not be the only one who can’t stand the suspense... I know this topic has taken over the list, and it's probably run its course now so you can breathe easy. The last puzzle remains unsolved, though I got a couple of tips

Re: Sorting cards problem solved

2022-01-03 Thread David V Glasgow via use-livecode
Please let me not be the only one who can’t stand the suspense... > On 3 Jan 2022, at 7:18 pm, J. Landman Gay via use-livecode > wrote: > > On 1/3/22 12:13 PM, Mark Wieder via use-livecode wrote: >> On 1/3/22 9:30 AM, J. Landman Gay via use-livecode wrote: >>> Right, Zweibelwähe should be

Re: Sorting cards problem solved

2022-01-03 Thread J. Landman Gay via use-livecode
On 1/3/22 12:13 PM, Mark Wieder via use-livecode wrote: On 1/3/22 9:30 AM, J. Landman Gay via use-livecode wrote: Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps inside the Vegetable category. Just not this one. If I sort by Category (after adding the two fields to

Re: Sorting cards problem solved

2022-01-03 Thread J. Landman Gay via use-livecode
On 1/3/22 11:38 AM, Klaus major-k via use-livecode wrote: Is this -> "Zweibelwähe" supposed to be a german dish with/from onions? If yes, then it is called -> Zwiebelwähe (Zwiebel = onion in german) "Zweibelwähe" is not a german word. :-) Must have been the client's typo, it's that way in the

Re: Sorting cards problem solved

2022-01-03 Thread Mark Wieder via use-livecode
On 1/3/22 9:30 AM, J. Landman Gay via use-livecode wrote: Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps inside the Vegetable category. Just not this one. If I sort by Category (after adding the two fields to the first two cards as Alex suggested) I see the

Re: Sorting cards problem solved

2022-01-03 Thread Klaus major-k via use-livecode
Hi Jaques, > Am 03.01.2022 um 18:30 schrieb J. Landman Gay via use-livecode > : > > Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps > inside the Vegetable category. Just not this one. Is this -> "Zweibelwähe" supposed to be a german dish with/from onions? If yes,

Re: Sorting cards problem solved

2022-01-03 Thread J. Landman Gay via use-livecode
Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps inside the Vegetable category. Just not this one. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On January 3, 2022 10:38:14 AM Mark Wieder via use-livecode

Re: Sorting cards problem solved

2022-01-03 Thread Mark Wieder via use-livecode
On 1/2/22 9:41 PM, J. Landman Gay via use-livecode wrote: And...the client is pleased but noticed it all sorts very nicely except for the last card, which is in the correct category but out of alphabetical order. Anyone care to figure out why?    - sort by title -- okay    - sort by

Re: Sorting cards problem solved

2022-01-02 Thread J. Landman Gay via use-livecode
There seems to be some interest in the recipe content, or maybe the puzzle, given the number of downloads. At any rate, if you downloaded already, please replace the Sort button with the revised script: on menupick pWhich put the last word of pWhich into tFld sort cards by the short id of

Re: Sorting cards problem solved

2022-01-02 Thread J. Landman Gay via use-livecode
Well, it was an interesting puzzle. The "mark" property has come up before but I didn't think it through enough. This seems to work: put the last word of pWhich into tFld -- popup menu with fld names sort cards by the short id of this cd -- import order; keep first 13 cards at front mark

Re: Sorting cards problem, and a link

2022-01-02 Thread Rick Harrison via use-livecode
Ouch! That’s why I always charge an hourly rate, and never quote by the job. Here’s hoping you solve your problem soon! Rick > On Jan 2, 2022, at 1:17 AM, J. Landman Gay via use-livecode > wrote: > > On 1/1/22 11:30 PM, Rick Harrison via use-livecode wrote: >> I’ve been looking at the

Re: Sorting cards problem, and a link

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 5:45 PM, J. Landman Gay via use-livecode wrote: Hi Alex, thanks so much for volunteering. There's a Dropbox transfer here: And...that was supposed to be private but anyone else who wants to look, feel free. Maybe you'll find some interesting things to cook. -- Jacqueline Landman

Re: Sorting cards problem, and a link

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 7:25 PM, Alex Tweedly via use-livecode wrote: 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

Re: Sorting cards problem, and a link

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 11:30 PM, Rick Harrison via use-livecode wrote: I’ve been looking at the exchange of messages here which had made me want to ask, why are you sorting cards at all? Wouldn’t it be easier just to use array pointers or an index for the cards. You can sort the pointers however you like

Re: Sorting cards problem, and a link

2022-01-01 Thread Rick Harrison via use-livecode
Hi Jacque, I’ve been looking at the exchange of messages here which had made me want to ask, why are you sorting cards at all? Wouldn’t it be easier just to use array pointers or an index for the cards. You can sort the pointers however you like and the cards never have to move at all according

Re: Sorting cards problem, and a link

2022-01-01 Thread Alex Tweedly via use-livecode
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

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
Fantastic, thank you. The more eyes, the better. Look for an email. :) I hadn't thought to collect the IDs and titles (title sort seems to work, it's the categories that fail.) But I did look at the original export text file for anomalies and couldn't find anything. I can try your suggestion.

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 4:40 PM, doc hawk via use-livecode wrote: paul pondered, I'm not sure about this, but do all the cards have the SAME background with the SAME fields (I think they were Category and Title?). If you have mixed backgrounds - I think there may be sort problems sorting on background

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
Except for the first two cards, all the rest use the same background. I created a single card with a single background, and then imported a text file, creating new cards along the way, so I'm sure they're all the same. On 1/1/22 4:36 PM, Paul Dupuis via use-livecode wrote: I'm not sure about

Re: Sorting cards

2022-01-01 Thread Alex Tweedly via use-livecode
I'd be happy to look - but my knowledge is entirely LC - never touched HC, so that may prevent me seeing something relevant. Suggestions (that you may have tried already :-) : 1. loop through the cards: put the short ID of this card & TAB & field "title" ... after myVariable then try

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
Hmm, I better take that back. Here’s the original manual: https://vintageapple.org/macbooks/pdf/HyperCard_Users_Guide_1988.pdf I’ll plead 30 years . . . ___ use-livecode mailing

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
paul plead > I meant different backgrounds on different cards. For example, cards 1-20 > have background ID 1234 but cards 21-40 have background ID 6789. I think both > both could even have the same name, and have the same fields, but a sort by a > bg fld might only sort the cards with the

Re: Sorting cards

2022-01-01 Thread Paul Dupuis via use-livecode
On 1/1/2022 5:40 PM, doc hawk via use-livecode wrote: paul pondered, I'm not sure about this, but do all the cards have the SAME background with the SAME fields (I think they were Category and Title?). If you have mixed backgrounds - I think there may be sort problems sorting on background

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 2:18 PM, doc hawk via use-livecode wrote: Something is trying to stir in a dusty corner of my mind, from long ago. Didn’t hypercard have some kind of property/tag that cause cards to be excluded from sorting? Or maybe it was something like foreground/background status? As I think

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
paul pondered, > I'm not sure about this, but do all the cards have the SAME background with > the SAME fields (I think they were Category and Title?). If you have mixed > backgrounds - I think there may be sort problems sorting on background > fields. Again, this is from memory and I could

Re: Sorting cards

2022-01-01 Thread Paul Dupuis via use-livecode
I'm not sure about this, but do all the cards have the SAME background with the SAME fields (I think they were Category and Title?). If you have mixed backgrounds - I think there may be sort problems sorting on background fields. Again, this is from memory and I could be wrong. On 1/1/2022

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
Something is trying to stir in a dusty corner of my mind, from long ago. Didn’t hypercard have some kind of property/tag that cause cards to be excluded from sorting? Or maybe it was something like foreground/background status? As I think about tit, there *must* have been something, as

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
I'm still not having much luck with this. Everything works as expected except that the first 50 cards or so simply don't move. I can't find anything different about them that would explain it. Anyone out there have an inclination to take a look and find what I'm missing? There's nothing

Re: Sorting cards

2021-12-30 Thread J. Landman Gay via use-livecode
Thanks for all the ideas, guys. I seem to get the most consistent results if I sort by the short ID of each card and then follow that with the sort for category or title. Because the data was imported from a text file, the original order is the order of the card IDs. What threw me originally

Re: Sorting cards

2021-12-30 Thread doc hawk via use-livecode
If you’re working on the original stack and not a duplicate, I suppose you could always kill -9 Livecode before it saves . . . ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your

Re: Sorting cards

2021-12-30 Thread William Prothero via use-livecode
Actually, I like Jackie’s idea better. Make an array for each of the parameters to be sorted on. Then sort each of the arrays. You can access each card in the sorted order by referring to the card ID in the sorted array. Or you could put each card identifier in a text line with commas between

Re: Sorting cards

2021-12-30 Thread William Prothero via use-livecode
It might be less work to just implement your own sorting code. I’ve found them pretty easy to implement. A bubble sort is very simple, but inefficient for a large number of items to sort. If you have a lot of cards, you would want to use a more efficient algorithm. Check out the link below if

Re: Sorting cards

2021-12-30 Thread Alex Tweedly via use-livecode
On 30/12/2021 19:38, J. Landman Gay via use-livecode wrote: Thanks for the reply. I understand how it works, my question is how to make it not work that way. :) Basically, I don't want the sub-sort. The 'sub-sort' will only have any effect if there are cards with identical values for the

re: Sorting cards

2021-12-30 Thread Quentin Long via use-livecode
sez J. Landman Gay:> I am converting an old stack to LC and it needs to sort cards by one of two fields. LC does  > stable sorts, so if I sort by field 1 it works, and then if I sort later by >field 2 it retains  > the original sort and does a sub-sort. I don't want that. What's the best way

Re: Sorting cards

2021-12-30 Thread Jerry Jensen via use-livecode
Behold the new keyword undoSort > On Dec 30, 2021, at 12:19 PM, doc hawk via use-livecode > wrote: > > > jacqui jagged, > >> What's the best way to ignore the previous sort order? > > I think what you’re looking at here isn’t even livecode itself. > > Just about any computer sort doesn’t

Re: Sorting cards

2021-12-30 Thread doc hawk via use-livecode
jacqui jagged, >What's the best way to ignore the previous sort order? I think what you’re looking at here isn’t even livecode itself. Just about any computer sort doesn’t change the order of two objects that “tie” during a sort—whichever was first, remains first. I think you’re going to

Re: Sorting cards

2021-12-30 Thread J. Landman Gay via use-livecode
Thanks for the reply. I understand how it works, my question is how to make it not work that way. :) Basically, I don't want the sub-sort. On the other hand, something may have gone wrong when sorting by the first field because the order didn't change at all -- it was like I never executed the

Re: Sorting cards

2021-12-30 Thread Alex Tweedly via use-livecode
You shouldn't need to ignore the previous sort. The second sort over-rides the first; it's only when looking at those cards which have the same value for the second field that the previous sorting applies. So if we have A2 B1 A1 C3 If we sort by char 2 of each, we would get    B1 A1 A2 C3