Page 1 of 1

Save and open file requesters

Posted: Thu Dec 19, 2013 1:57 am
by wombats
The Save and Open file requesters in PB (on Windows at least) do not prompt the user to confirm overwriting a file. We have to do this manually, and while this works, it doesn't fit in with other programs, and looks a little unprofessional. OFN_OVERWRITEPROMPT is the flag on Windows, I believe. Could we also have a "flags" parameter for SaveFileRequester(), so that we may pass our own flags? OFN_FILEMUSTEXIST and OFN_PATHMUSTEXIST would be nice additions, too.

On OS X, all files are enabled by default. wilbert showed that the patterns can have an effect. Can this be added to PureBasic, please?

Thanks for considering this.

Re: Save and open file requesters

Posted: Thu Dec 19, 2013 1:14 pm
by Bisonte
Maybe I'm confused, but the requesters are only a comfortable way to prompt the user for a filename .... so it saves nothing or opens nothing on every os....

So you have to ask the user on every os to overwrite a file... With messagerequester and yes/no/cancel options its look like the same as the filerequesters...

So I don't understand this request. (I also not understand why there is an Open and a SaveFileRequester in PB... they do the same, so miss I something ?)

Re: Save and open file requesters

Posted: Thu Dec 19, 2013 5:45 pm
by Demivec
Bisonte wrote:(I also not understand why there is an Open and a SaveFileRequester in PB... they do the same, so miss I something ?)
SaveFileRequester() doesn't allow the option for #PB_Requester_MultiSelection.

Re: Save and open file requesters

Posted: Thu Dec 19, 2013 11:29 pm
by Bisonte
thx. That makes sense ;) but a simple flag... and an Open&SaveFRQ renamed to FileRequester ;)

Re: Save and open file requesters

Posted: Thu Dec 19, 2013 11:59 pm
by wombats
Bisonte wrote:So you have to ask the user on every os to overwrite a file... With messagerequester and yes/no/cancel options its look like the same as the filerequesters...
On Windows, in most applications, if the file already exists, a dialog will popup asking the user if they want to overwrite it. This happens while the save requester is still open. In PureBasic, we have to ask the user after the save requester is closed, and then open another save requester if they choose not to overwrite the file.

Image

It's a small thing, I know, but it would be nice.

Re: Save and open file requesters

Posted: Fri Dec 20, 2013 8:00 pm
by IdeasVacuum
I agree Wombats, looks more professional. It is possibly the case that the extra flags are not supported by PB because it's different or difficult on the other platforms.

Re: Save and open file requesters

Posted: Sat Dec 21, 2013 3:02 am
by PB
Been requested twice before (2009 and 2012), both in December too!

http://www.purebasic.fr/english/viewtop ... =3&t=40424

And now in December 2013. Seems to be a recurring Christmas wish. :lol:

Re: Save and open file requesters

Posted: Sat Dec 21, 2013 3:51 am
by wombats
PB wrote:Been requested twice before (2009 and 2012), both in December too!

http://www.purebasic.fr/english/viewtop ... =3&t=40424

And now in December 2013. Seems to be a recurring Christmas wish. :lol:
So it does. Maybe third time lucky? ;)