RequestFile: DefaultExt parameter
BlitzMax Forums/BlitzMax Module Tweaks/RequestFile: DefaultExt parameter
| ||
Save dialogs in a lot of applications add on the usual extension to a file name if none is supplied. This is pretty easy to do yourself of course:If ExtractExt(NewPath) = "" Then NewPath = StripExt(NewPath) + ".ext" ...but it'd be a good idea to have an optional parameter for it in RequestFile. |
| ||
I agree. There's a problem with the "adding it yourself" bit, and an additional argument as to why it should be handled this way: If you give the FileRequester the save flag, it will pop-up a message telling you of a filename conflict if the filename already exists. However if the user has typed a filename that already exists, it won't catch it, because the filename doesn't exist until you add the extension yourself! |
| ||
Good Idea. I second it |
| ||
Here is a function that will do what you want. I have renamed it to requestfile2 in fact this way you could use it without changing the system.mod. But you can also replace the function in this module and replace it. |