Comments (26)
in fact Alphanum is not a "one header only" lib (forgotten that ^^). so your proposal is a better choice
from imguifiledialog.
No nothing specific. I have not tried yet the DemoApp. I will try that and let you know! Thanks.
from imguifiledialog.
Yes, I tested both on MacOS (my main machine) and on Windows (with a win64 toolchain). I can try on linux if needed (but I'm not sure as you are already doing some tests on linux).
"Happy" to see that you also have an issue ;-).
from imguifiledialog.
i have the issue in the dialog but not in the tests with the same file list...
from imguifiledialog.
Just tried the latest version with the fix you released two hours ago. It is working like a charm, many thanks!
from imguifiledialog.
i have fix it i guess.
if you have some time can you test the last build pls ?
from imguifiledialog.
hello,
no its easy and i could provide a way for anyone use his own sorting or integrate as a third party the one header library alphanum i have mirrored on github some years ago
from imguifiledialog.
Hello,
That would be perfect. Many thanks!
Vincent
from imguifiledialog.
I have added the feature for sorting of filenames and extensions.
Finally self made and maybe optimizable a bit.
Since its slower than the base sorting, the use is optional.
You can enable it by using the flag ImGuiFileDialogFlags_NaturalSorting
from imguifiledialog.
Many thanks for you time and reactivity. I just tried the lastest version on a simple test case. I have three files in a folder: file1.txt, file2.txt and file11.txt.
The standard sort algorithm gives the following order: file1.txt, file11.txt, file2.txt.
The natural sort algorithm that has just been added gives: file11.txt, file1.txt, file2.txt.
My file explorer (Finder) gives: file1.txt, file2.txt, file11.txt.
From what I had in mind and understood, my file explorer gives the correct output as as the number should not be treated digit by digit but as a "whole".
What do you think?
from imguifiledialog.
i just tried your test files and this is what i obtain via the DemoApp :
i have added the testing of this feature and he is ok on macos, so its weird..
from imguifiledialog.
Yes, this is weird. Anyway, that means that the issue is on my side! Thank you very much for this implementation.
from imguifiledialog.
yes maybe but i would like to know what can be the bug.
any particular locales ?
can you tried the DemoApp branch ?
from imguifiledialog.
I did compile the DemoApp and here is what I got :
That is really weird. Just to make sure, we just have to click on the arrow located on the left of File name
to sort the content, right?
By the way, to be able to use the DemoApp, I had to change line 67 of the file mainWinLinuxMacOS.cpp from
#if APPLE
to
#if __APPLE__
otherwise I had the following error message when I tried to execute the application:
Glfw Error 65543: NSGL: The targeted version of macOS does not support OpenGL 3.0 or 3.1 but may support 3.2 and above
from imguifiledialog.
yes just click on the header. even if you dont click the sorting must be ok
thanks for the define
can you enable the tests and run them ?
from imguifiledialog.
I compiled the tests and run them. Nothing happened and nothing was printed in the terminal (I tried to execute the test from my IDE - CLion - and from the terminal). Is it the attended behavior when everything is fine?
I found a log file whose content is
Start testing: Jul 07 16:44 CEST
----------------------------------------------------------
End testing: Jul 07 16:44 CEST
I dive a little bit in the code and I think I do not understand how the tests work. In the CMakeLists.txt file of the test folder, there is a line
include_directories("../src")
but there is not src
directory... What am I missing?
from imguifiledialog.
no, when its fine you have a full list fo sucessfull tests
i think you dont have enabled them, you must set the cmake option USE_TEST=ON
you can check the files im using for github actions in .github/workflows/
and take a one for your compiler
ex for gcc :
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_DIRENT_FILESYSTEM=ON
cmake --build build --config Release
ctest --test-dir build --output-on-failure
thanks for your time, i appreciate a lot :)
from imguifiledialog.
No, I enabled the test in the main CMakeLists.txt file. I compiled manually (and no longer with my IDE). It worked. You can find the results here. All the tests passed successfully.
This is really strange! What can I do to help you?
PS : you are welcome and thank you for the wonderful library.
from imguifiledialog.
nothing, in my mind, is the tests was passed successfully, so the natural sorting must be ok.
i have a linux vm i will test. maybe i missed something for the unix behavior( mac or linux)
from imguifiledialog.
FYI, I have compiled my code on a windows machine, the DemoApp also and the unit tests. Nothing has changed. This is not working as expected using the DemoApp, but all the tests are OK.
There must be something I do wrong!
from imguifiledialog.
there is a but related to the ordering on linux. im investigating..
you have compiled on windows but with a win32 toolchain ?
why was you on mac.. not sure understand.
you have tested on win and mac ?
from imguifiledialog.
no finally i have the same result. i just got an exceptions for a particular comparison.
but the sorting is bad in one sense..
in ascending i got test1, test2, test11
but in descending i got test11, test1, test2 but could be test11, test2, test1
will fix that
from imguifiledialog.
It seems to be vicious issue. How can I help you?
from imguifiledialog.
nice for you but i always have an issue around :(
from imguifiledialog.
I just compiled the latest build, and more specifically the DemoApp. Everything runs smoothy and works as expected. All the unit tests passed successfully.
I think we can conclude that everything is ok and we can close definitely this issue.
Many thanks for your time and efficiency.
from imguifiledialog.
yep cool.
many thanks for your time too. π
from imguifiledialog.
Related Issues (20)
- Possible misuse of comma operator here HOT 1
- How to set ImGuiFileDialog Window Flags? HOT 1
- Icon to filter looks like a search icon (magnifying glass) instead of a filter icon (funnel), which is misleading HOT 3
- Icon to clear the filter is identical to the icon to go to the root directory. HOT 4
- [Key Exploration] Allow to select a file from the displayed list by pressing keys with delay for have more chars than just the first HOT 4
- File dialog selects file in working directory over selected one HOT 2
- Not localizable HOT 7
- Right-align file size column HOT 2
- Show ".." entry (and other folders) first HOT 9
- Non existing folders appear on top HOT 9
- Add way for avoid the listing of particular dirs/files global or by paths
- For Embedded Dialog Use MinSize Instead of MaxSize argument HOT 7
- Obsolete flag in the latest version of Dear Imgui HOT 3
- Exploration keys. the rows are auto selected when using up/down key.. BUG
- Only the first thumbnail is rendered HOT 3
- Build fails when IMGUI_HAS_VIEWPORT HOT 2
- Show also drive names instead of only letters in Windows HOT 1
- strlen() segfault when using with cimgui (strlen-avx2.S) HOT 7
- Some files cannot list HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imguifiledialog.