> hi all...
>
> i've a problem for over one month now.
> i just can't reproduce it.
>
> situation:
> i've a main window.
> from this main window i'm able to open window2.
> window2 has a toolbar with icons.
>
> everytime i open window2 the icons are visible...
> but after i chose a file from a filedialog and create another window, i always get the error:
> "Can't load image from file 'icons/reattach.png': file does not exist.
> or:
> Failed to load icon from the file 'icons/sm.ico' (error 2: System can't find File.)
It is always a good idea to
use FindBin;
load "$FindBin::RealBin/icons/my.ico" ( ok, you should use
File::Spec, but you get the idea )
> but the file exist!
> and the current working directory hasn't changed.
Are you sure? Doesn't explicitly chdir()ing to the program
directory solve the problem?
> it doesn't mather if i set a defaultDir or not.
> the problem doesn't occur if i just create the filedialog but don't select a file.
I am almost sure that filedialog does a chdir() in some versions
of wxWindows ( because the native Win32 dialog does that ).
HTH
Mattia
|