[v571b2]Cannot see long default file in OpenFileRequester()?

Just starting out? Need help? Post your questions and find answers here.
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

[v571b2]Cannot see long default file in OpenFileRequester()?

Post by skywalk »

Code: Select all

If 1  ;-!TRY OpenFileRequester()
  ;BUG; Windows 10 Pro v1903(6.3.18362.239), PB v571b2 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: Still broken in Windows 10 v1903.
Last edited by skywalk on Mon Jul 22, 2019 9:42 pm, edited 4 times in total.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: [v57] Cannot see long default files in OpenFileRequester

Post by Dude »

Code: Select all

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?
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: [v57] Cannot see long default files in OpenFileRequester

Post by skywalk »

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
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: [v57] Cannot see long default files in OpenFileRequester

Post by Dude »

When I use this code, it works fine for me:

Code: Select all

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
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: [v57] Cannot see long default files in OpenFileRequester

Post by skywalk »

nice, what version of pb & Windows?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: [v57] Cannot see long default files in OpenFileRequester

Post by Dude »

PureBasic 5.70 LTS (x86) on Windows 10 Pro 64-bit (1809).
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: [v57] Cannot see long default files in OpenFileRequester

Post by skywalk »

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
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: [v57] Cannot see long default files in OpenFileRequester

Post by TI-994A »

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! Please visit my YouTube Channel :D
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: [v57] Cannot see long default files in OpenFileRequester

Post by Dude »

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.
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: [v57] Cannot see long default files in OpenFileRequester

Post by skywalk »

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
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: [v57] Cannot see long default files in OpenFileRequester

Post by Dude »

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. :(
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: [v571b2]Cannot see long default file in OpenFileRequeste

Post by skywalk »

I just updated Windows 10 to latest and this is still broken in Windows 10 v1903. :cry:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply