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: 10246
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 2 times

Post Reply