Save and open file requesters

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
wombats
Enthusiast
Enthusiast
Posts: 716
Joined: Thu Dec 29, 2011 5:03 pm

Save and open file requesters

Post 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.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: Save and open file requesters

Post 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 ?)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Save and open file requesters

Post 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.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: Save and open file requesters

Post by Bisonte »

thx. That makes sense ;) but a simple flag... and an Open&SaveFRQ renamed to FileRequester ;)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
wombats
Enthusiast
Enthusiast
Posts: 716
Joined: Thu Dec 29, 2011 5:03 pm

Re: Save and open file requesters

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Save and open file requesters

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Save and open file requesters

Post 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:
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
wombats
Enthusiast
Enthusiast
Posts: 716
Joined: Thu Dec 29, 2011 5:03 pm

Re: Save and open file requesters

Post 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? ;)
Post Reply