It is currently Fri Mar 22, 2019 9:50 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [v57] Cannot see long default files in OpenFileRequester()?
PostPosted: Wed Mar 13, 2019 7:53 pm 
Online
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 2858
Location: Boston, MA
PB v57 x64 & x86, Windows 10 Pro v1803
Code:
If 1  ;-!TRY OpenFileRequester()
  ;BUG; Windows 10 Pro v1803, PB v57 x86 & x64
  ;BUG; Cannot see start of long default file?
  CreateDirectory("C:\try")
  CreateDirectory("C:\try\try1")
  CreateDirectory("C:\try\try1\try2")
  CreateFile(99, "C:\try\try1\try2\z12345678901234567890.txt")
  CloseFile(99)
  Define.s Title$       = "Read txt file"
  ;Define.s DefFilePath$ = "C:\try\try1\try2\z12345678901234567890.txt"
  Define.s Pattern$     = "Text Files (csv,txt,dat)|*.csv;*.txt;*.dat|CSV Files (*.csv)|*.csv|All Files (*.*)|*.*"
  Define.i PatternPos   = 0
  Define.i MultiSelect  = 0;#PB_Requester_MultiSelection
  r$ = OpenFileRequester(Title$, DefFilePath$, Pattern$, PatternPos, MultiSelect)
EndIf
EDIT: May be fixed in Windows 10 v1809. See below.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Last edited by skywalk on Thu Mar 14, 2019 10:21 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 1:31 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1845
Code:
CreateDirectory("C:\try")
CreateDirectory("C:\try1")
CreateDirectory("C:\try2")
CreateFile(99, "C:\try\try1\try2\z12345678901234567890.txt")

No bug. How can CreateFile (and then OpenFileRequester) work if the path "C:\try\try1\try2\" doesn't exist?


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 1:52 am 
Online
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 2858
Location: Boston, MA
haha, that's a typo. :oops:
Try the full path and see.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 2:08 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1845
When I use this code, it works fine for me:

Code:
Define.s Title$       = "Read txt file"
Define.s DefFilePath$ = "C:\try\try1\try2\z12345678901234567890.txt"
Define.s Pattern$     = "Text Files (csv,txt,dat)|*.csv;*.txt;*.dat|CSV Files (*.csv)|*.csv|All Files (*.*)|*.*"
Define.i PatternPos   = 0
Define.i MultiSelect  = 0;#PB_Requester_MultiSelection
OpenFileRequester(Title$, DefFilePath$, Pattern$, PatternPos, MultiSelect)

Image


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 3:26 am 
Online
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 2858
Location: Boston, MA
nice, what version of pb & Windows?

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 3:33 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1845
PureBasic 5.70 LTS (x86) on Windows 10 Pro 64-bit (1809).


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 5:14 am 
Online
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 2858
Location: Boston, MA
ok, I will try x86 tomorrow, but I am not on the fast track for Windows 1809. That will come out in general ~November.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 6:06 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 2172
Location: Singapore
It appears that the long file name in the File Name box isn't really truncated. For some strange reason, it's been scrolled to the left, leaving only the end portion visible. Moving the cursor with the left arrow key would reveal the full file name.

Windows 10 b1803, so presumably, a Windows issue.

_________________
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 7:06 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1845
skywalk wrote:
I am not on the fast track for Windows 1809. That will come out in general ~November.

Hmm, I got 1809 last year when I used the Win10 Media Creation Tool to make a Win 10 ISO for me.


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Thu Mar 14, 2019 5:15 pm 
Online
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 2858
Location: Boston, MA
Yes, early adopters have access to 1809, but there are still many bugs in that version that I cannot risk.
But, good to know that version fixes this filerequester() bug. Now, I have to hook the dialog and sendkey {HOME} to see the full file. :(
I thought it was some PB problem when importing the dialog api?

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [v57] Cannot see long default files in OpenFileRequester
PostPosted: Fri Mar 15, 2019 12:05 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1845
skywalk wrote:
I have to hook the dialog and sendkey {HOME} to see the full file

I could swear I posted some tiny code to do that before, but can't find it with a search now. :(


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: skywalk and 9 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:  

 


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