Just starting out? Need help? Post your questions and find answers here.
skywalk
Addict
Posts: 4003 Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA
Post
by skywalk » Wed Mar 13, 2019 7:53 pm
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
Posts: 1907 Joined: Mon Feb 16, 2015 2:49 pm
Post
by Dude » Thu Mar 14, 2019 1:31 am
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?
skywalk
Addict
Posts: 4003 Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA
Post
by skywalk » Thu Mar 14, 2019 1:52 am
haha, that's a typo.
Try the full path and see.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Dude
Addict
Posts: 1907 Joined: Mon Feb 16, 2015 2:49 pm
Post
by Dude » Thu Mar 14, 2019 2:08 am
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)
skywalk
Addict
Posts: 4003 Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA
Post
by skywalk » Thu Mar 14, 2019 3:26 am
nice, what version of pb & Windows?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Dude
Addict
Posts: 1907 Joined: Mon Feb 16, 2015 2:49 pm
Post
by Dude » Thu Mar 14, 2019 3:33 am
PureBasic 5.70 LTS (x86) on Windows 10 Pro 64-bit (1809).
skywalk
Addict
Posts: 4003 Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA
Post
by skywalk » Thu Mar 14, 2019 5:14 am
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
TI-994A
Addict
Posts: 2512 Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:
Post
by TI-994A » Thu Mar 14, 2019 6:06 am
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
Dude
Addict
Posts: 1907 Joined: Mon Feb 16, 2015 2:49 pm
Post
by Dude » Thu Mar 14, 2019 7:06 am
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.
skywalk
Addict
Posts: 4003 Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA
Post
by skywalk » Thu Mar 14, 2019 5:15 pm
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
Posts: 1907 Joined: Mon Feb 16, 2015 2:49 pm
Post
by Dude » Fri Mar 15, 2019 12:05 am
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.
skywalk
Addict
Posts: 4003 Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA
Post
by skywalk » Mon Jul 22, 2019 9:43 pm
I just updated Windows 10 to latest and this is still broken in Windows 10 v1903.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum