Re: Sort bug and also multilevel sorting

2023-09-07 Thread Craig Newman via use-livecode
rote: > > Ralph: Interesting. Your code works as you present it, sorting the given > items by the sortkey function f1 which adds 1 to each item. I do get the > “sorting failed” dialog. > > But if I try the same thing using myVal modified as you suggest, which adds > the first

Re: Sort bug and also multilevel sorting

2023-09-06 Thread Neville Smythe via use-livecode
Ralph: Interesting. Your code works as you present it, sorting the given items by the sortkey function f1 which adds 1 to each item. I do get the “sorting failed” dialog. But if I try the same thing using myVal modified as you suggest, which adds the first and second items of each line of data

Re: Sorting by item ... of each and item ... of each

2023-09-06 Thread Craig Newman via use-livecode
Matthias. I do not have your original data. But try using “&” instead of “and”. Craig > On Sep 5, 2023, at 5:05 PM, Ralph DiMola via use-livecode > wrote: > > You can at least detect if the sorting function has failed using a global > variable. > > global s1 >

RE: Sorting by item ... of each and item ... of each

2023-09-05 Thread Ralph DiMola via use-livecode
You can at least detect if the sorting function has failed using a global variable. global s1 command test1 local t1 --put "10,9,8,7,6,5,4,3,2,1" into t1 -- This line will not show an error put "10,9,8,7a,6,5,4,3,2,1" into t1 -- This line will show an error

Re: Sorting by item ... of each and item ... of each

2023-09-05 Thread Craig Newman via use-livecode
tthias, >>>> I do not think that the syntax "sort by sortKey1 and sortKey2" >>>> is supported >>> >>> Heh technically it 'is' - and does do something but it won't be what you >>> expected... >>> >>> So the syntax for sort

Re: Sorting by item ... of each and item ... of each

2023-09-05 Thread Craig Newman via use-livecode
it 'is' - and does do something but it won't be what you >> expected... >> >> So the syntax for sort in this case is: >> >> sort by >> >> This works by iterating over the elements in , passing each >> through the expression to generate a sort key

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread matthias rebbe via use-livecode
lly it 'is' - and does do something but it won't be what you > expected... > > So the syntax for sort in this case is: > > sort by > > This works by iterating over the elements in , passing each > through the expression to generate a sort key list, sorting

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread matthias rebbe via use-livecode
Thanks Panos, you are right. ;) While reading your answer i remembered that i have done this with 2 separate sorts. I really don't know how i thought to use by sortKey1 and sortKey2 But at least the script editor did not return an error. Should not work so late in the night. Matthias > Am

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread matthias rebbe via use-livecode
Thanks Phil, i will try. > Am 03.09.2023 um 07:22 schrieb Phil Davis via use-livecode > : > > I believe this works: > > on mouseUp >put fld 1 into tList >sort lines of tList by _sortKey(each) >put tList into fld 2 > end mouseUp > > > function _sortKey pLine >

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread Mark Waddingham via use-livecode
: sort by This works by iterating over the elements in , passing each through the expression to generate a sort key list, sorting that list and then reordering the original list. Expressions can contain the boolean 'and' operator, so: sort by X and Y Means that the sort key is evalu

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread panagiotis m via use-livecode
Hello Matthias, I do not think that the syntax "sort by sortKey1 and sortKey2" is supported If you have multiple sortKeys, you have to do multiple sorts, for example, in your use case, this should work: set the itemdel to ";" sort lines of tList numeric by item 3 of each sort lines of tList

Re: Sorting by item ... of each and item ... of each

2023-09-02 Thread Phil Davis via use-livecode
I believe this works: on mouseUp     put fld 1 into tList     sort lines of tList by _sortKey(each)     put tList into fld 2 end mouseUp function _sortKey pLine     set the itemDel to ";"     return item 3 of pLine & ";" & item 2 of pLine end _sortKey I

Re: Sorting by item ... of each and item ... of each

2023-09-02 Thread matthias rebbe via use-livecode
Of course my "not working" sort code look like this set the itemdelimiter to ";" sort lines of tList numeric by item 3 of each and item 2 of each. > Am 03.09.2023 um 02:59 schrieb matthias_livecode_150...@m-r-d.de: > > Maybe i do not see the forest for the trees > > I have a tab

Sorting by item ... of each and item ... of each

2023-09-02 Thread matthias rebbe via use-livecode
Maybe i do not see the forest for the trees I have a tab delimited list which i want to sort. I am using this code to sort it by item 3 and item 2 set the itemdelimiter to tab sort lines of tList numeric by item 3 of each and item 2 of each. But that code does not sort as i expected it.

Re: Polygrid sorting

2023-08-25 Thread Paul Dupuis via use-livecode
Polygrid, unlike the Datagrid, has no built in column sorting. You have to roll your own. Before I write my own, has anyone written a column sort (i.e click on a column header to sort by it) for a Poly grid they'd care to share? ___ use-livecode

Re: Polygrid sorting

2023-08-25 Thread panagiotis m via use-livecode
5 Aug 2023 at 02:57, Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > The Polygrid, unlike the Datagrid, has no built in column sorting. You > have to roll your own. > > Before I write my own, has anyone written a column sort (i.e click on a > column header

Polygrid sorting

2023-08-24 Thread Paul Dupuis via use-livecode
The Polygrid, unlike the Datagrid, has no built in column sorting. You have to roll your own. Before I write my own, has anyone written a column sort (i.e click on a column header to sort by it) for a Poly grid they'd care to share? ___ use

Re: Sorting Arrays

2023-08-12 Thread Bob Sneidar via use-livecode
I formatted the sortKeys as I would an SQL query or an LC sort, but then I needed to isolate the key from the parameters because I couldn’t assume the sort key was simply the first word. Sent from my iPhone > On Aug 12, 2023, at 09:36, J. Landman Gay via use-livecode > wrote: > > I used a

Re: Sorting Arrays

2023-08-12 Thread J. Landman Gay via use-livecode
I used a short, one-dimensional numbered array: put the weekdayNames into tDataA split tDataA by cr simpleSortNumberedArray tDataA, "descending,text" But as Alex explained, one dimension wasn't enough. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software |

Re: Sorting Arrays

2023-08-12 Thread J. Landman Gay via use-livecode
Got it, thanks. The array was numbered but I didn't have enough dimensions. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On August 11, 2023 7:03:33 PM Alex Tweedly via use-livecode wrote: On 11/08/2023 23:00, J. Landman Gay via

Re: Sorting Arrays

2023-08-11 Thread Bob Sneidar via use-livecode
Send me what you have. Thanks. Sent from my iPhone > On Aug 11, 2023, at 17:02, Alex Tweedly via use-livecode > wrote: > >  >> On 11/08/2023 23:00, J. Landman Gay via use-livecode wrote: >> On 8/10/23 2:29 PM, Alex Tweedly via use-livecode wrote: >> [ ... code from earlier posting ...] >

Re: Sorting Arrays

2023-08-11 Thread Alex Tweedly via use-livecode
On 11/08/2023 23:00, J. Landman Gay via use-livecode wrote: On 8/10/23 2:29 PM, Alex Tweedly via use-livecode wrote: [ ... code from earlier posting ...] I couldn't get this to work until I altered it, but I was using a very simple array. What type of array data did you use? I think I'm

Re: Sorting Arrays

2023-08-11 Thread J. Landman Gay via use-livecode
On 8/10/23 2:29 PM, Alex Tweedly via use-livecode wrote: Combining my "traditional" way as above, and your example, I came up with a  simpler way to do the same thing: on simpleSortNumberedArray @pArrayDataA, pSortKeys    local tKeys, tSeq, tOneSortKey, tSortCommand    put

Re: Sorting Arrays

2023-08-10 Thread Bob Sneidar via use-livecode
I see you are sorting the keys of the array. I’ll give your method a try. Bob S On Aug 10, 2023, at 12:29 PM, Alex Tweedly via use-livecode wrote: And - overall, an alternate suggestion. I think your way is a bot complex. Combining my "traditional" way as above, and your example,

Re: Sorting Arrays

2023-08-10 Thread Bob Sneidar via use-livecode
as anyone come across a need to sort a numbered array by the values of the >> different keys? Here you go. > > Absolutely I have needed that quite often now. I tend to use sequences > (numbered arrays) often - maybe too often. > > Up until now I've just done the sorting in the

Re: Sorting Arrays

2023-08-10 Thread Alex Tweedly via use-livecode
I've just done the sorting in the "traditional" way (i.e. using multiple "sort" commands), like    put seqAsLines(sQ2) into tKeys    sort lines of tKeys numeric by sQ2[each]["anumber"]    sort lines of tKeys by sQ2[each]["thecategory"]    rebuild

Sorting Arrays

2023-08-08 Thread Bob Sneidar via use-livecode
Has anyone come across a need to sort a numbered array by the values of the different keys? Here you go. Keep in mind that there is no error checking so I have no idea what would happen if you provided a sort key that didn’t exist in the array. on sortNumberedArray @pArrayDataA, pSortKeys

Re: Datagrid column sorting

2023-03-20 Thread Paul Dupuis via use-livecode
check box presumably sets the datagrid property to the column name My question for the hivemind is: Is there a way in a Datagrid to may a specific column NOT sortable? It appears when I initially populate the datagrid, I can 'set the dgProp["sort by column"] of group "Datagrid&quo

Datagrid column sorting

2023-03-20 Thread Paul Dupuis via use-livecode
tially populate the datagrid, I can 'set the dgProp["sort by column"] of group "Datagrid" to empty' to ensure NO default sorting of the data takes place initially. However, then the user can click on the column header and a sort on the column clicked in performed whe

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Mike Kerner via use-livecode
oh, i love this topic. this onion is so, so thick. since you are throwing in the curveball of on-demand column sorting, i have several suggestions (and these are just my suggestions): the obvious one is to use one of the bajillion ways that LC can sort, right? grab the data (if you don't already

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Paul Dupuis via use-livecode
So what if you use the column headers on a PolyGrid (or whatever) to give the user a UI for sorting by column (adding, or not, sort arrows to the header labels). Is it still more efficient to re-query the database with the new, user chosen, sort order and repopulate the PolyGrid? Or more

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Bob Sneidar via use-livecode
Not sure how that happened. If the source is a DATABASE... On Aug 25, 2022, at 08:02 , Bob Sneidar via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: +1 if the source is a dabs, sort during query. Bob S ___ use-livecode mailing list

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Bob Sneidar via use-livecode
+1 if the source is a dabs, sort during query. Bob S On Aug 25, 2022, at 07:21 , Mike Kerner via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: it will probably be faster and more flexible to have your database do your soriting for you, though. On Mon, Aug 15, 2022 at 7:47 PM

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Mike Kerner via use-livecode
ng puts "true" first. > > > On 8/15/2022 7:25 PM, Alex Tweedly via use-livecode wrote: > > So it occurred to me, while playing with sorting by columns, that it > > might be nice to have an additional "sortType" available. > > > > I'd li

Re: AW: Polygrid sorting (problems)

2022-08-18 Thread Paul Dupuis via use-livecode
pgText of widget X ALL not returning the full data for a PolyGrid widget is a confirmed bug: See https://quality.livecode.com/show_bug.cgi?id=23886 On 8/15/2022 3:34 PM, Paul Dupuis via use-livecode wrote: So there is an example of sorting in the PolyGrid documentation under the entry for the M

Re: AW: Polygrid sorting (problems)

2022-08-18 Thread Mike Kerner via use-livecode
t returning the full data for a PolyGrid widget is a confirmed bug: > > > > See https://quality.livecode.com/show_bug.cgi?id=23886 > > > > > > > > On 8/15/2022 3:34 PM, Paul Dupuis via use-livecode wrote: > >> So there is an example of sorting in the PolyGrid

Re: AW: Polygrid sorting (problems)

2022-08-18 Thread Paul Dupuis via use-livecode
Dictionary for PolyGrid 1.1.1) the pgText of widget X ALL not returning the full data for a PolyGrid widget is a confirmed bug: See https://quality.livecode.com/show_bug.cgi?id=23886 On 8/15/2022 3:34 PM, Paul Dupuis via use-livecode wrote: So there is an example of sorting in the PolyGrid

AW: Polygrid sorting (problems)

2022-08-17 Thread Paul Dupuis via use-livecode
=23886 On 8/15/2022 3:34 PM, Paul Dupuis via use-livecode wrote: So there is an example of sorting in the PolyGrid documentation under the entry for the MESSAGE "headerClick" and under the entry to the PROPERTY "text" (and in 'the text of me') The example code only s

Re: Polygrid sorting

2022-08-16 Thread Mark Smith via use-livecode
ot; stack (for Datagrid testing) I converted to the Polygrid >>> and can easily generate 1000 columns x 1000 rows of data and it works. >>> >>> So I guess the answer to bug >>> https://quality.livecode.com/show_bug.cgi?id=23875 is "Use the PolyGrid"

Re: Polygrid sorting

2022-08-16 Thread Mark Smith via use-livecode
Hi Paul, My bad. I don’t have the polygrid widget installed. I bought the summer bundle but haven’t had time to install or play with it. I will try this afternoon and send feedback later. Mark > On 15 Aug 2022, at 9:49 pm, Paul Dupuis via use-livecode > wrote: > > FYI, > > I also just

Re: Polygrid sorting (problems)

2022-08-15 Thread Mark Wieder via use-livecode
On 8/15/22 16:43, Mark Wieder via use-livecode wrote: On 8/15/22 16:22, Alex Tweedly via use-livecode wrote: I haven't tried csvdata or tsvdata (they're not listed in the dictionary, so I'd tend to avoid them if possible. I do see tsvData in the dictionary, but I'm getting weird errors

Re: Polygrid sorting (problems)

2022-08-15 Thread Paul Dupuis via use-livecode
On 8/15/2022 7:51 PM, Paul Dupuis via use-livecode wrote: On 8/15/2022 7:22 PM, Alex Tweedly via use-livecode wrote: On 15/08/2022 20:34, Paul Dupuis via use-livecode wrote: So there is an example of sorting in the PolyGrid documentation under the entry for the MESSAGE "headerClick"

Re: Polygrid sorting (problems)

2022-08-15 Thread Paul Dupuis via use-livecode
On 8/15/2022 7:22 PM, Alex Tweedly via use-livecode wrote: On 15/08/2022 20:34, Paul Dupuis via use-livecode wrote: So there is an example of sorting in the PolyGrid documentation under the entry for the MESSAGE "headerClick" and under the entry to the PROPERTY "text" (an

Re: Sorting [was: Polygrid sorting]

2022-08-15 Thread Paul Dupuis via use-livecode
nding puts "false" first and descending puts "true" first. On 8/15/2022 7:25 PM, Alex Tweedly via use-livecode wrote: So it occurred to me, while playing with sorting by columns, that it might be nice to have an additional "sortType" available. I'd like to be ab

Re: Polygrid sorting (problems)

2022-08-15 Thread Mark Wieder via use-livecode
On 8/15/22 16:22, Alex Tweedly via use-livecode wrote: I haven't tried csvdata or tsvdata (they're not listed in the dictionary, so I'd tend to avoid them if possible. I do see tsvData in the dictionary, but I'm getting weird errors thrown from the widget when I try to use it. May still be

Re: Sorting [was: Polygrid sorting]

2022-08-15 Thread Bob Sneidar via use-livecode
Datagrids have this feature, so yes, I would expect there to be some way to specify what kind of sort you want to do. But it would have to be on a per column basis. But if you are sorting the text yourself, you can use the syntax: sort lines of tText by item n of each. I don't think any

Re: Polygrid sorting (problems)

2022-08-15 Thread Bob Sneidar via use-livecode
-livecode wrote: >> So there is an example of sorting in the PolyGrid documentation under the >> entry for the MESSAGE "headerClick" and under the entry to the PROPERTY >> "text" (and in 'the text of me') >> >> The example code only sort the visible

Sorting [was: Polygrid sorting]

2022-08-15 Thread Alex Tweedly via use-livecode
So it occurred to me, while playing with sorting by columns, that it might be nice to have an additional "sortType" available. I'd like to be able to say  - if all the 'things' being sorted on are numbers, then sort numeric, otherwise sort alphabetical. Would that be a

Re: Polygrid sorting (problems)

2022-08-15 Thread Alex Tweedly via use-livecode
On 15/08/2022 20:34, Paul Dupuis via use-livecode wrote: So there is an example of sorting in the PolyGrid documentation under the entry for the MESSAGE "headerClick" and under the entry to the PROPERTY "text" (and in 'the text of me') The example code only sort the visib

Re: Polygrid sorting

2022-08-15 Thread Paul Dupuis via use-livecode
On 8/15/2022 4:55 PM, Mark Wieder via use-livecode wrote: On 8/15/22 13:12, Paul Dupuis via use-livecode wrote: So I see that the Summer Bundle of widgets in the store has a note that says "Latest update 1.0.19: 11 August 2022" However, the Download button says "Version 1.0.0". Does anyone

Re: Polygrid sorting

2022-08-15 Thread Mark Wieder via use-livecode
On 8/15/22 13:12, Paul Dupuis via use-livecode wrote: So I see that the Summer Bundle of widgets in the store has a note that says "Latest update 1.0.19: 11 August 2022" However, the Download button says "Version 1.0.0". Does anyone know how to update the widget set to 1.0.19 or how to update

Re: Polygrid sorting

2022-08-15 Thread Paul Dupuis via use-livecode
FYI, I also just tested on a MacBook Air, M1, running Monterey with LC9.6.8 and the version 1.0.0 of the Summer Bundle widget packs and the PolyGrid and my sample stack displayed for me at 10, 100, and 500 columns and rows. On 8/15/2022 4:01 PM, Mark Smith via use-livecode wrote: Hi Paul,

Re: Polygrid sorting

2022-08-15 Thread Paul Dupuis via use-livecode
I just tested on macOS Mojave (10.14) on an Intel MacBook Pro and the PolyGrid and my sample stack work as expected. Tried 10, 100, and 500 columns/rows. Now I have to find the MacBook Air with Monterey and see... 8/15/2022 4:01 PM, Mark Smith via use-livecode wrote: Hi Paul, I downloaded

Re: Polygrid sorting

2022-08-15 Thread Paul Dupuis via use-livecode
/show_bug.cgi?id=23875 is "Use the PolyGrid" On that note, the Datagrid has 2 features I use in this specific case, user column resizing (built into the Polygrid - Yea!) and column sorting (NOT built into the Polygrid - Boo!). So, does anyone have some column sort code for the Polygrid they

Re: Polygrid sorting

2022-08-15 Thread Paul Dupuis via use-livecode
se the PolyGrid" On that note, the Datagrid has 2 features I use in this specific case, user column resizing (built into the Polygrid - Yea!) and column sorting (NOT built into the Polygrid - Boo!). So, does anyone have some column sort code for the Polygrid they have written that they might be wil

Re: Polygrid sorting

2022-08-15 Thread Mark Smith via use-livecode
ug > https://quality.livecode.com/show_bug.cgi?id=23875 is "Use the PolyGrid" > > On that note, the Datagrid has 2 features I use in this specific case, user > column resizing (built into the Polygrid - Yea!) and column sorting (NOT > built into the Polygrid - Boo!). So, doe

Re: Polygrid sorting (problems)

2022-08-15 Thread Paul Dupuis via use-livecode
So there is an example of sorting in the PolyGrid documentation under the entry for the MESSAGE "headerClick" and under the entry to the PROPERTY "text" (and in 'the text of me') The example code only sort the visible rows as "the text of widget X" returns

Polygrid sorting

2022-08-15 Thread Paul Dupuis via use-livecode
quot; On that note, the Datagrid has 2 features I use in this specific case, user column resizing (built into the Polygrid - Yea!) and column sorting (NOT built into the Polygrid - Boo!). So, does anyone have some column sort code for the Polygrid they have written that they might be willing

Re: sorting datagrids

2022-07-01 Thread Hershel F via use-livecode
this is more what i’m concerned. i’ll give it a shot and let you know. thanks. > On Jun 30, 2022, at 7:26 PM, Bob Sneidar via use-livecode > wrote: > > > put the dgText of group "myDataGrid" into tText > set the itemDelimiter to tab > > repeat with i = 1 to the number of lines of tText >

Re: sorting datagrids

2022-06-30 Thread Bob Sneidar via use-livecode
Or are you talking about sorting the DATA of a datagrid? put the dgText of group "myDataGrid" into tText set the itemDelimiter to tab repeat with i = 1 to the number of lines of tText put item i of tText into tLine sort items of tLine ascending put tLine into line i of tText

Re: sorting datagrids

2022-06-30 Thread Bob Sneidar via use-livecode
t 15:59 , Hershel F via use-livecode > wrote: > > Hi all, is there any way of sorting a data grid horizontally? > thanks a mill. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsub

sorting datagrids

2022-06-30 Thread Hershel F via use-livecode
Hi all, is there any way of sorting a data grid horizontally? thanks a mill. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com

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
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 a

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
.  - 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

Sorting cards problem, and a link

2022-01-01 Thread J. Landman Gay via use-livecode
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

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
TAB & field "title" ... after myVariable then try sorting the items of myVariable. That might tell you whether there's something odd in or about the fields, or whether it's card-specific. 2. Take advantage of the stable sort.   For those cards that shouldn't move, add a specif

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
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. -- Jacqueline Landman Gay

Re: Sorting cards

2022-01-01 Thread Alex Tweedly via use-livecode
ariable then try sorting the items of myVariable. That might tell you whether there's something odd in or about the fields, or whether it's card-specific. 2. Take advantage of the stable sort.   For those cards that shouldn't move, add a specific custom property / value.   Then, after sortin

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

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 3

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

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
each item and sort on item # of the lines. Hope this makes sense. Bill P Easy peasy. Best, Bill P Sent from my iPad > On Dec 30, 2021, at 1:15 PM, William Prothero via use-livecode > wrote: > > It might be less work to just implement your own sorting code. I’ve found > t

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

Re: Sorting cards

2021-12-30 Thread Alex Tweedly via use-livecode
rsions you included below - either randomize or put back into original (ID) order first. 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 command. I need to investigate that. Yeah, it s

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

  1   2   3   4   >