- wxStringTokenizer tok( wild, _T("|") );
-
- wxCHECK_MSG( tok.CountTokens() <= 2, _T("*.*"), msg );
-
- if( tok.CountTokens() == 1 ) return wild;
+ wxArrayString wildDescriptions, wildFilters;
+ const size_t count = wxParseCommonDialogsFilter(wild,
+ wildDescriptions,
+ wildFilters);
+ wxCHECK_MSG( count, _T("*.*"), wxT("wxFileDialog: bad wildcard string") );
+ wxCHECK_MSG( count == 1, _T("*.*"), msg );