wxLoadFileSelector is not returning selected file path in Linux.

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Priya
Knows some wx things
Knows some wx things
Posts: 43
Joined: Fri Apr 07, 2017 8:38 am

wxLoadFileSelector is not returning selected file path in Linux.

Post by Priya » Wed Apr 12, 2017 5:02 am

Hi

I need help on wxLoadFileSelector.

I have developed a small wxwidgets application. In which am using wxLoadFileSelector to select a file.

Code: Select all

m_xmlPath = wxLoadFileSelector("Select .xml File", ".xml", "", this);
if (m_xmlPath.empty())
	return;
the above code is working fine in Windows 7. Am getting the full path in m_xmlPath variable(wxStirng variable).

But in ubuntu16.10 it is not returning the path. Am not able to get the value of m_xmlPath variable. It is not empty also i guess bcoz it is not return from the check m_xmlPath.empty(). This condition fails and gose to next stmt. When i saw the variable value in watch window it was showing "".

Can i use wxLoadFileSelector in linux for selecting a file??
I even tried wxFileDialog. Same issue am facing.

Please help me where am doing wrong.

Regards,
Priya

User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 429
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: wxLoadFileSelector is not returning selected file path in Linux.

Post by xaviou » Wed Apr 12, 2017 8:58 am

Hi.

I've just tested on a Linux Mint "Debian Edition" (LMDE) with wxWidgets 3.1.1, and it works correctly.

Witch version of wxWidgets are you using ?
And where does it come from (official repos, own build, ...) ?

Regards
Xav'
My wxWidgets stuff web page : [email protected]'s wxStuff

Priya
Knows some wx things
Knows some wx things
Posts: 43
Joined: Fri Apr 07, 2017 8:38 am

Re: wxLoadFileSelector is not returning selected file path in Linux.

Post by Priya » Wed Apr 12, 2017 10:00 am

Hi Xav

Am using Ubuntu 16.10 , wxwidgets 3.1.0 and IDE code Block.
I tried the return variable to print in message box. Am getting the value. but in watch window for that variable it shows "".

I have downloaded the .tar file and build own.

Regards,
Priya

Post Reply