Filechooser issue

Hi,
The method “bool browseForFileToOpen (FilePreviewComponent *previewComponent=0)” allows selection of multiple files. This happens on juce_1.39 and juce_1.45 am not sure whether it’s fixed in juce_1.46.

I was able to fix it by adding following code to "/macosx/platform_specific_code/juce_mac_FileChooser.cpp"
if (selectMultipleFiles)
            options.optionFlags |= kNavAllowMultipleFiles;
 else   // if multiple files selection is not required
          options.optionFlags -= kNavAllowMultipleFiles;

Till mac ox 9 “kNavAllowMultipleFiles” flag was set to 0 by default but now it is set to 1, and the documentation is not updated, since it’s carbon.

If

if (selectMultipleFiles)
            options.optionFlags |= kNavAllowMultipleFiles;

this condition is replaced with the following condition

if (!selectMultipleFiles)
            options.optionFlags -= kNavAllowMultipleFiles;

then the code would work fine for both multiple and single file selection
regards,
vishvesh

Thanks, though that entire file is about to get replaced by a Cocoa version!

Cocoa would be great