Home » U++ Library support » FileSel&FileList, Path » FileSel: sort by file modification time
FileSel: sort by file modification time [message #51872] |
Tue, 11 June 2019 08:56 |
pvictor
Messages: 67 Registered: December 2015
|
Member |
|
|
Hi,
It would be fine to have an option to sort files in the list by modification time.
It helps when you need to find the most recently changed file in a folder, containing hundreds of files.
Best regards,
Victor
|
|
|
|
|
Re: FileSel: sort by file modification time [message #52156 is a reply to message #51910] |
Tue, 30 July 2019 12:09 |
Tom1
Messages: 1216 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
The above change broke my external initialization access to sortbyext...
Could we have these two added to FileSel? :
FileSel& Sort(int kind) { sortby.SetData(kind); return *this; }
FileSel& Columns(int n) { list.Columns(n); return *this; }
Best regards,
Tom
|
|
|
Re: FileSel: sort by file modification time [message #52157 is a reply to message #52156] |
Tue, 30 July 2019 12:48 |
Tom1
Messages: 1216 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
On the second thought, instead of the above, could we simply have this added to FileSel.h:
#define FILELISTSORTVERSION 2
This way I could tell apart which version of file list sorting I'm dealing with. The rest can be handled in an inherited class allowing access to list.Columns too... This approach allows backward compatibility for my code with earlier Upp versions.
Best regards,
Tom
EDIT: Looking at the large picture, is there or could it be possible to have a builder injected "#define UPPSVNREVISION xxxxx" so I could refer to that in any piece of code? This would completely resolve the above and all similar compatibility issues where support for different Upp versions is required.
[Updated on: Tue, 30 July 2019 13:26] Report message to a moderator
|
|
|
|
Re: FileSel: sort by file modification time [message #52159 is a reply to message #52158] |
Tue, 30 July 2019 14:38 |
Tom1
Messages: 1216 Registered: March 2007
|
Senior Contributor |
|
|
Hi Mirek,
Thanks! Now it all works with both old and new FileSel.
If I use:
bmSVN_REVISION returns my own code's SVN revision number, but in this case I would need to know Upp revision number. How can I do that?
Best regards,
Tom
|
|
|
|
Goto Forum:
Current Time: Wed May 15 04:25:15 CEST 2024
Total time taken to generate the page: 0.03721 seconds
|