chriscalef Posted January 20, 2017 Posted January 20, 2017 Well this is one that probably doesn't get a lot of testing, but it seems to have broken at around the time I went to SDL and DirectX11, and I've tested it on a stock build and it's broken there as well. The symptom is: when you call openFolderDialog in order to get a folder name from the user, the dialog works fine, the Cancel button works fine, but the Open button does nothing at all. Anybody got any quick ideas how to fix this? It's causing major last minute problems in my otherwise pretty functional build. :( You can test it easily with the following script function: function testFolderDialog() { %dlg = new OpenFolderDialog() { DefaultPath = ""; Filters = ""; }; if(%dlg.Execute()) { %path = %dlg.FileName; echo("dialog executed! path = " @ %path); } else { echo("dialog failed to execute! path = " @ %path); } %dlg.delete(); } Quote
chriscalef Posted January 20, 2017 Author Posted January 20, 2017 Ah, fixed it! Turned out I was missing the following file from my build, not sure why it isn't there (in either my stock Torque build or my project build), but when I added it to the project, things got better:platformWin32/nativeDialogs/fileDialog.cpp Quote
JeffR Posted January 23, 2017 Posted January 23, 2017 Well, that's for the windows-only method. The NativeFileDialogs lib handles the cross-platform file dialog action when using SDL.That said, hadn't thought of folder selection, and looking at it, the NFD lib may not support it out of the box. I'll look into dealing with that, but for now your workaround should be fine, if only for windows currently. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.