It is currently Fri Jun 22, 2018 5:56 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: OpenfileRequester() accept StandardFile for directory
PostPosted: Mon Sep 18, 2017 9:43 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 3863
Location: Germany
Hi,

current state (windows) if the standard file is only a directory, the directory is not always selected.
If the standard file is a not existing file in the directory, the directory is not always selected.

There is no 100% working way to set an absolute directory as startpoint for the OpenFileRequester().

Ok, in the help is written StandardFile, so I didn't post this in the bug section.
It looks like a feature request. :wink:

Bernd


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenfileRequester() accept StandardFile for directory
PostPosted: Mon Sep 18, 2017 10:08 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 396
Location: France
In the first case (directory only) I noticed that this only happens if I forget the final antislash.
(PB 5.61) (and I often forget it)

Code:
OpenFileRequester("", "C:\Windows\", "", 0)
; OK, \ at end so open in C:\Windows

OpenFileRequester("", "C:\Windows", "", 0)
; Open in root and use Windows as filename

But that's probably the expected behavior. What else to do ?
:wink:

_________________
(English is not my native language, I used an online translator)
Windows 10 x64 - CPU intel i3 - RAM 16Go - NVidia GT 620 - 1920x1080 - Linux Slackware, Debian - xfce - (VirtualBox 5) - raspberry pi


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenfileRequester() accept StandardFile for directory
PostPosted: Mon Sep 18, 2017 10:47 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 3863
Location: Germany
I always use GetPathPart(ProgramFilename()) as parameter which returns a string containing the last \

Bernd


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenfileRequester() accept StandardFile for directory
PostPosted: Mon Sep 18, 2017 10:50 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1426
Marc56us wrote:
But that's probably the expected behavior.

Of course it is. In your second example, you're using a file named "Windows" as the default file to be selected. Nothing wrong with that.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Denis and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye