Page 1 of 1
save file interface request
Posted: Fri Jan 13, 2006 4:10 am
by WanderingHead
Could the save file interface please be improved to actually correctly sort by alphabetical or save date (and time of day) order?
I may be unusual in having lots of saves, but it is always difficult to actually find things. It currently does a "sort of correct some of the time" kind of sorting that is quite perplexing.
RE: save file interface request
Posted: Fri Jan 13, 2006 8:15 am
by JanSorensen
Could you give an example of savenames that dont properly sort?
RE: save file interface request
Posted: Fri Jan 13, 2006 5:51 pm
by Lebatron
I could. I have been using a form like Lebatronvsplayer turn 1. It works fine up to turn 9 then when I get to 10-19 it places 10-19 between 1 and 2. Then at turn 20 it places it between 2 and 3 and so on. I noticed this is a problem with Microcrap Windows not knowing how to count, because it even does this in the save folder. When I select organize by name or type it does that funky incorrect reordering. Any suggestions on how to correct that problem? I suppose I could use 2 digits to start with, but why must Microsoft make us do that!?
RE: save file interface request
Posted: Fri Jan 13, 2006 6:07 pm
by JanSorensen
Well, that is the correct ordering when sorting text strings so I fail the see the problem. This does not have anything to do with Microsoft either.
As you say - if you want numbers that may become 2-digit to sort as texts you simply start with 01, 02 etc.
RE: save file interface request
Posted: Sat Jan 14, 2006 4:23 am
by WanderingHead
My naming convention is such that they sort properly in Windows.
The convention is <game_name>_<year>q<quarter>_p<player_number>. Then an "a" suffix means end of movement and "b" means end of production. So I end up with 3 files for every player turn. E.g. bb_jc_1943q3_p2 is me (bb) against "jc", q3 is summer, p2 is start of Japanese turn.
My current example after purging some files for simplicity is:
01/09/2006 09:49p bb_jc_1943q3_p2.psv
01/11/2006 07:24p temp.psv
01/09/2006 09:49p bb_jc_1943q3_p1b.psv
01/09/2006 09:41p bb_jc_1943q3_p1a.psv
01/09/2006 10:13p bb_jc_1943q3_p2a.psv
01/09/2006 10:22p bb_jc_1943q3_p3.psv
Now, interestingly, the above is the order that they appeared from a "dir" command in a cmd window, and it is also the order that GGWAW displays when I use the leftward down arrow over the file display. So presumably GGWAW is using some kind of OS supplied something that is goofing. If I display it in a Windows Explorer window then everything sorts hunky dory.
You may think that "temp.psv" is some kind of exception, but it has also occurred when all files conform to the naming convention.
Currently my arrow above the save date in the file display appears to do nothing. It is not changing the display order at all.
RE: save file interface request
Posted: Sat Jan 14, 2006 8:26 am
by JanSorensen
That is certainly odd, thanks for the report.
I admit that I never really noticed those sort arrows - but as you say the one to sort by date appears to have no effect. Thats clearly a bug.
I cannot seem to duplicate the sorting error though. Could I possibly ask you to mail me 4 of those save files that sort wrong (say the first 4 from your list) so I can check if those sort wrongly on my system too? My mail is
janbs@stofanet.dk
RE: save file interface request
Posted: Sat Jan 14, 2006 5:31 pm
by WanderingHead
I sent them. I'm not confident you'll reproduce it with them. My guess is that it is some funky thing about how DOS sees them on the disk, and GGWAW just uses that OS function.
So, if you have a different OS version or if they are written to the disk in some different way it may appear different.
I've got MS Windows 2000 SP4.
RE: save file interface request
Posted: Sat Jan 14, 2006 5:35 pm
by JanSorensen
They do indeed not sort incorrect for me. I am using WinXP SP2. What the culprit might be I cannot figure out.
RE: save file interface request
Posted: Sat Jan 14, 2006 5:40 pm
by WanderingHead
I just found that "dir" can accept a sort order specifier.
When I do "dir", I get the files in the same misordered sequence as I get in GGWAW. If I do "dir /ON" I get them properly name sorted, and "dir /OD" is properly date sorted.
Based on what I observed, I suspect GGWAW just uses the output of dir or some equivalent of DOS or Windows and expects it to be in order. And it usually is. I don't think that GGWAW does the explicit sorting.
Adding the explicit sorting in GGWAW should definitely fix it, or adding the option to the OS call should fix it.