- https://www.mathworks.com/matlabcentral/fileexchange/10867-uipickfiles-uigetfile-on-steroids
- https://www.mathworks.com/matlabcentral/fileexchange/22805-uigetfiles
- https://www.mathworks.com/matlabcentral/fileexchange/60074-uigetfile_with_preview-gui-dialog-window-with-a-preview-panel
- https://www.mathworks.com/matlabcentral/fileexchange/101754-uigetadvancedfiles
- https://www.mathworks.com/matlabcentral/fileexchange/4506-uigetfiles-with-java-interface
- https://www.mathworks.com/matlabcentral/fileexchange/32555-uigetfile_n_dir-select-multiple-files-and-directories
- https://www.mathworks.com/matlabcentral/fileexchange/68307-uiget
UIPUTFILE Documentation Innaccurate/Change Warning Dialog?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
The doc for returned file argument for uiputfile says in part...
- If the user specifies an existing file name, then a warning dialog box opens stating that the file already exists and provides an option to replace the file.
- If the user clicks Yes in the warning dialog box, then MATLAB replaces the existing file and returns the file name.
- If the user clicks No in the warning dialog box, then control returns to the uiputfile dialog box, enabling the user to specify a different file name.
- If the user cancels the dialog box, then MATLAB returns 0 to file.
This appears to be incorrect in that clicking Yes doesn't actually do anything to the existing file, but is the only way to retrieve the filename if the application wants to append further data to an existing file as if the user gets scared going to immediately trash the file from the warning message (the app can't control) and cancels, one is in a "can't get there from here" loop.
Is, in fact, the behavior described not, in fact true (don't see how it could be, really, the dialog doesn't actually open the file; it just returns the file name; the dialog just scares the user into thinking it will do so).
So, the secondary Q? is -- if one is actually going to append to an existing file, is there a way to change the popup warning message to tell the user not to fret; the file isn't going to be zapped, or should just forget about uiputfile and use uigetfile instead that has no such dialog as the easier coding route? Except uigetfile won't accept anything except an existing file so can't make a new one that way...
So, that's out; fixing the dialog warning somehow seems more needed than I thought as am left to just type into a text field manually without the benefit of the browswer window.
0 comentarios
Respuestas (1)
Jan
el 26 de Oct. de 2022
I agree, that the text of the documentation is misleading.
"Select a file to append or choose a new file" does not match the purpose of uigetfile or uiputfile.
There are some FileExchange contribution, which expand these 2 standard functions:
I'm not sure, if one of them satisfies the need to choose or create a file. Maybe one of the methods can be adjusted accordingly.
Sorry, if you have checked this already. I'm aware that you do know the FEX also.
3 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!