Alphabeticising a word list?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10411
Joined: Wed May 06, 2009 2:28 pm

Re: Alphabeticising a word list?

Post by dunbarx » Tue Nov 25, 2025 3:55 pm

Richmond.

The "key" field lists the chars of interest, however many there are. I sorted those alphabetically before prepending to the "main" sorted list just because it seemed appropriate.

Can you modify my handler to maintain the key order? Let me know if you need a hand.

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10248
Joined: Fri Feb 19, 2010 10:17 am

Re: Alphabeticising a word list?

Post by richmond62 » Tue Nov 25, 2025 4:06 pm

I suspect that after I have recovered from a rather nasty bout of 'flu
feeling extremely sorry for myself at the moment, so this will have to wait: but it will be first on my list once I am up and about again.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4197
Joined: Sun Jan 07, 2007 9:12 pm

Re: Alphabeticising a word list?

Post by bn » Tue Nov 25, 2025 11:31 pm

Here is a version for custom sort that lets you define the alphabet used and which letters take precedence when sorting.
It sorts not only the first letter but sorts all letters of a word according to the preferences.
Could not test it with old slavonic since I have not access to an old slavonic alphabet nor do I have old slavonic text.
All code is in the button as well as some explanations.

Kind regards
Bend
Attachments
sortByListData_3.livecode.zip
(2.41 KiB) Downloaded 6 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10248
Joined: Fri Feb 19, 2010 10:17 am

Re: Alphabeticising a word list?

Post by richmond62 » Thu Nov 27, 2025 2:10 pm

The need for this was put forth by Richmond Mathewson who deals with languages whose
# numerical ASCII or Unicode numbers are not in sort order for that alphabet.
As the alphabets I deal with do not have a historical sort order, only one decoded on by some Profs.; and, even were the letters encoded in than sort oder by the Unicode consortium, were that to work, it would conflcit with modern languages that use some or all of those letters in a different sort order.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10248
Joined: Fri Feb 19, 2010 10:17 am

Re: Alphabeticising a word list?

Post by richmond62 » Thu Nov 27, 2025 2:27 pm

SS 2025-11-27 at 15.25.23.png
-
That works perfectly. 8)

Thank you very much indeed.

Post Reply