11-23-2013, 05:17 AM
oort, that command will extract the directory from the file name selected. If you check the wp8_file.erl (./win32_file; ./wx_file) you will see that they are only managing open_file and save_file. By checking the win32 driver (wings_file_drv.c) you will notice that it is using the respective OS functions (GetOpenFileName and GetSaveFileName). For directory selection Windows uses other function SHBrowseForFolder.
You can also check the wx module of Erlang and you will notice that wings uses a call to wxFileDialog:new for create a Open or Save dialog. For directory browsing it should use wxDirDialog.
So - until this option be added (if it be someday) - the best option is select a file and extract the directory if necessary (using the function you pointed).
I think that for this case it's not a problem since that is interesting be sure that you will find the executable in the place the user choosing it.
You can also check the wx module of Erlang and you will notice that wings uses a call to wxFileDialog:new for create a Open or Save dialog. For directory browsing it should use wxDirDialog.
So - until this option be added (if it be someday) - the best option is select a file and extract the directory if necessary (using the function you pointed).
I think that for this case it's not a problem since that is interesting be sure that you will find the executable in the place the user choosing it.