foldername with spaces

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
e_garden
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Sep 20, 2006 6:47 pm

foldername with spaces

Post by e_garden » Mon Oct 16, 2006 6:50 pm

I don't know if this is the right forum for this topic, so correct me if I'm wrong.

I've built an application which loads images (.png and .ico) from a folder placed with the .exe file, using a relative path. It works perfectly when I place them (image folder + .exe) in a folder containing no spaces, but when it does contain spaces, sometimes the app just can't find the images... usually it works when it starts, but after 'playing' with it a little the images are not found. Anyone has ever faced it? Does it have to do with a wxGenericDirCtrl I'm using? The relative path is written in the code and I don't intentionally change it with the wxGenericDirCtrl.

I'm using wxWidgets 2.6.3 and Visual Studio 2005 (on Windows XP).

Thanks in advance.

Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor » Fri Oct 20, 2006 1:13 pm

Could you explain your 'playing' with it a little (perhaps some code). Are you changing the current folder ?

And what are youthinking about images are not found ? Do images cannot be loaded ? or is it just the wxGenericDirCtrl which does not see images ?
What is little and green, witch go up and down ??
Yoda playing with the force.

e_garden
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Sep 20, 2006 6:47 pm

Post by e_garden » Mon Oct 23, 2006 3:32 pm

I have a frame with a wxGenericDirCtrl int it, and I have also an independent dialog which loads an image from a relative path defined in code. When I first run the app and open this dialog (pressing a button or an item in a menu), this image can be loaded. Then, I close it (the dialog, not the main frame) and select some files from arbitrary folders in the wxGenericDirCtrl (that was what I meant with 'playing', just picking arbitrary stuff), which has nothing to do (at least I think it shouldn't) with that path defined in code, and when I open that dialog again, the image is not loaded anymore! It happens only when the .exe is placed in a folder which name contains spaces. It doesn't happen when the foldername has no spaces.

Post Reply