1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00

Updated the documentation to include a MacOS caveat to the FileChooser

This commit is contained in:
Tom Poole 2017-12-19 19:18:40 +00:00
parent 65ba5128c7
commit 43cff0ce48
2 changed files with 12 additions and 5 deletions

View file

@ -87,11 +87,12 @@ public:
file. If you create such a temporary file, you need
to delete it yourself, once it is not needed anymore.
@param filePatternsAllowed a set of file patterns to specify which files
can be selected - each pattern should be
separated by a comma or semi-colon, e.g. "*" or
"*.jpg;*.gif". An empty string means that all
files are allowed
@param filePatternsAllowed a set of file patterns to specify which files can be
selected - each pattern should be separated by a comma or
semi-colon, e.g. "*" or "*.jpg;*.gif". The native MacOS
file browser only supports wildcard that specify
extensions, so "*.jpg" is OK but "myfilename*" will not
work. An empty string means that all files are allowed
@param useOSNativeDialogBox if true, then a native dialog box will be used
if possible; if false, then a Juce-based
browser dialog box will always be used

View file

@ -37,6 +37,12 @@ static NSMutableArray* createAllowedTypesArray (const StringArray& filters)
for (int i = 0; i < filters.size(); ++i)
{
#if defined (MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6)
// From OS X 10.6 you can only specify allowed extensions, so any filters containing wildcards
// must be of the form "*.extension"
jassert (filters[i].indexOf ("*") <= 0);
#endif
const String f (filters[i].replace ("*.", ""));
if (f == "*")