OpenFileRequester and SaveFileRequester handling

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Controller
User
User
Posts: 28
Joined: Thu Jul 22, 2004 5:26 am
Location: Germany
Contact:

OpenFileRequester and SaveFileRequester handling

Post by Controller »

if passing an existing directory as filename,
OpenFileRequester and
SaveFileRequester
should goto this directory, instead of parent directory and using the "file part" as filename.
or these functions should have an option to behave so.

Also the file pattern handling is unreliable - well, standard windows behaviour.
Debug SaveFileRequester("a", "c:\test\test", "*.mp3|*.mp3", 1)
returns c:\test\test
not returning the proper extension, and thus ignoring an already existing file c:\test\test.mp3, or read-only overwrite question.
User avatar
Controller
User
User
Posts: 28
Joined: Thu Jul 22, 2004 5:26 am
Location: Germany
Contact:

Re: OpenFileRequester and SaveFileRequester handling

Post by Controller »

http://ctuser.net/_files/opensave01.7z
Few samples.
The open samples only bring the advantage of opening directories.
C:\Test will open the dialog in C:\Test, instead of C:[\] with filename Test (if such directory exists).

The save example also allowes opening directories.
Additionally it handles the file extension part, plus checks
1) file exists -> overwrite question
2) file attributes (readonly, directory with same name, system file)... and outputs generic warning
it does not (yet) check access to the file like the original dialog would.
Post Reply