Numeric Sort in Document Selector

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply

How important is it to you, to have this feature implemented into future versions of TextPad?

Important, even if the size/efficiency of TextPad increases/degrades
3
19%
Somewhat important
2
13%
I'm okay either way
3
19%
Somewhat unimportant
5
31%
Unimportant, even if the size/efficiency of TextPad remains unaffected
3
19%
 
Total votes: 16

User avatar
BenjiSmith
Posts: 49
Joined: Fri Jan 16, 2004 9:37 pm
Contact:

Numeric Sort in Document Selector

Post by BenjiSmith »

Sometimes I have to open 100 or more documents in the document selector. These documents often have file numbering suffixes, like this:

document1.txt
document2.txt
document3.txt
document4.txt
document5.txt


...or like this...

document.txt_1
document.txt_2
document.txt_3
document.txt_4
document.txt_5


...and sometimes (rarely), they have prefixes, like this...

1_document.txt
2_document.txt
3_document.txt
4_document.txt
5_document.txt


The document selector sorts by ASCII character values, so it starts to fall apart if you have more than 10 documents. They end up getting sorted like this:

document.txt_1
document.txt_10
document.txt_100
document.txt_11
document.txt_12
document.txt_13
document.txt_14
document.txt_15
document.txt_16
document.txt_17
document.txt_18
document.txt_19
document.txt_2
document.txt_20
document.txt_21
document.txt_22
...


Windows XP introduced numeric sorting into the windows explorer, so that the files get displayed in the more sensible numeric order. It would be nice to have something similar in TextPad's document selector, so that a directory full of numbered documents gets sorted numerically.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Does this not fall under http://textpad.com/forum/viewtopic.php?t=4216 ?
I.e. a more powerful file selector with Explorer-like attributes.

Edit: there is another poll on the file selector,
http://textpad.com/forum/viewtopic.php?t=4247 ,
maybe we should join all three of them?
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
ramonsky
Posts: 88
Joined: Fri Nov 14, 2003 10:54 am

Post by ramonsky »

Maybe we should have a poll to decide which poll to vote in? :)

Jill

Still - on the topic of this thread, it remains the case that "natural sorting" is not everyone's cup of tea. For a start, it's a platform dependent thing - implemented on WinXP, but not implemented on Win98. Should TP behave like Explorer on the platform on which it's running? Then there's the vexed issue of (ooh er) hexadecimal!. If we're going to use a decimal natural sort, why not a hexadecimal natural sort? Why should File_A not come between File_9 and File_10? (No need for anyone to answer this - I'm not being entirely serious here).

I get round the natural sorting problem by naming my files with leading zeroes, e.g. File_0001, File_0002, etc. Then they sort properly on all platforms all by themselves. This works in hex, too!
Post Reply