Problem in OpenFileRequester()

Just starting out? Need help? Post your questions and find answers here.
akj
Enthusiast
Enthusiast
Posts: 665
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Problem in OpenFileRequester()

Post by akj »

Either I'm making a stupid mistake or there is a bug in OpenFileRequester() and SaveFileRequester() under Win32.

The following code fails to show any .TXT (or .txt) files whenever the 'Text files' option is selected, even when such files exist in the targeted folder. It is OK when 'All files' is selected. I am in Debug mode.

Code: Select all

OpenFileRequester("Load File", "", "Text files *.TXT | *.TXT | All files | *.*", 0)
Last edited by akj on Sun Aug 23, 2009 9:55 pm, edited 1 time in total.
Anthony Jordan
UserOfPure
Enthusiast
Enthusiast
Posts: 469
Joined: Sun Mar 16, 2008 9:18 am

Re: PB4.40B2 Bug in OpenFileRequester()

Post by UserOfPure »

You're using the filter wrong. Read the manual again. ;)
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Post by Thunder93 »

Try ... OpenFileRequester("Load File", "", "Text (*.txt)|*.txt| All files | *.*", 0)
akj
Enthusiast
Enthusiast
Posts: 665
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Post by akj »

OK, it was the space between the second .TXT and the following | that was causing the problem. I did not realise that whitespace was so critical.

Thanks for your help.
Anthony Jordan
Post Reply