Agreed. That's weired. It seems to be related to the number of file extensions (wildcards). If you reduce this, it works properly again. I checked the wildcard string - it get's computed correctly though. So I'd say it's not our fault, but I wouldn't implement a hack around checking to see if the last wildcard (which is always "all files" is selected and then remove the additional file extensions. Let's hope it get's fixed in an upcoming wxWidgets release.
With regards, Morten.
Edit: I just found this piece of code inside wxWidgets:
wxString::size_type nDot = m_wildCard.find(_T("*."));
if ( nDot != wxString::npos )
nDot++;
else
nDot = 0;
We *do* have file masks that do not have a dot, e.g. "*Makefile" and "*.py;*SConstruct;*SConscript". MAybe it's our fault...?!
Bingo!!! "Python files|*.py;*SConstruct;*SConscript|" is the culprit. Adding this to any wxFileDialog will result in the strange behaviour for "All files". You can try with using for a wildcard masks:
Filters = _T("AngelScript files|*.as|Batch files|*.bat;*.cmd;*.nt|Make files|*Makefile;*.mak|Python files|*.py;*SConstruct;*SConscript|All files|*.*");
This won't work if you select "All files".
So - I'd say we have to fix the file masks (I believe the originate from the lexers)!
With regards, Morten.
now it has begun to become *really* weired: I've removed the extensions accordingly but: no success! Then I tried again my little demo example with the following wildcard:
Wildcard=AngelScript files|*.as|Batch files|*.bat;*.cmd;*.nt|Make files|*.mak|Python files|*.py|All files|*.*
Which result's in illegal file extensions! Now where is the issue here? As soon as you remove any of these extensions (e.g. "AngelScript files|*.as" it will work again. But this combination (although it's fully correct) won't work.
Somebody out there who has a glue what's going on here???
With regards, Morten.
I don't think so. The example in the documentation you mentioned has them, too:
"BMP and GIF files (*.bmp;*.gif)|*.bmp;*.gif|PNG files (*.png)|*.png"