Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
pvictor is currently offline  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 #51904 is a reply to message #51872] Thu, 13 June 2019 13:37 Go to previous messageGo to next message
pvictor is currently offline  pvictor
Messages: 67
Registered: December 2015
Member
Hi,

As no one of top guys responded, I made it myself.
The attachment contains changed files from CtrlLib.
The source files are from version 13386.

Best regards,
Victor
  • Attachment: CtrlLib.zip
    (Size: 18.57KB, Downloaded 186 times)
Re: FileSel: sort by file modification time [message #51910 is a reply to message #51904] Mon, 17 June 2019 11:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sorry for delay, I wanted to resolve it more completely. In trunk...

[Updated on: Mon, 17 June 2019 11:52]

Report message to a moderator

Re: FileSel: sort by file modification time [message #52156 is a reply to message #51910] Tue, 30 July 2019 12:09 Go to previous messageGo to next message
Tom1
Messages: 1212
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 Go to previous messageGo to next message
Tom1
Messages: 1212
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 #52158 is a reply to message #52157] Tue, 30 July 2019 13:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Applied both.

SVN revision is already available (e.g. see TheIDE about box, Version: field) in bmSVN_REVISION. The trouble is that it is not available always (as the source do not need to be svn based).
Re: FileSel: sort by file modification time [message #52159 is a reply to message #52158] Tue, 30 July 2019 14:38 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Mirek,

Thanks! Now it all works with both old and new FileSel.

If I use:
#include <build_info.h>

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
Re: FileSel: sort by file modification time [message #52161 is a reply to message #52159] Tue, 30 July 2019 16:01 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 30 July 2019 14:38
Hi Mirek,

Thanks! Now it all works with both old and new FileSel.

If I use:
#include <build_info.h>

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


You are right, that is not possible to use...

Mirek
Previous Topic: FileList/FileSel: Load() function ignores the last modification time of entries
Next Topic: Application hangs on renaming directories accidentally
Goto Forum:
  


Current Time: Thu Mar 28 20:01:16 CET 2024

Total time taken to generate the page: 0.01502 seconds