FileFilter on macOS

Hi fellas,

FileFilter on macOS does not work as expected. (Big Sur, OpenFL 9.1.0, Lime 7.9.0, Haxe 4.2.3).

Neither openfl.net.FileFilter nor lime.ui.FileDialog handles multiple extensions at all on macOS. If I set something like “png” for filter (Lime) or FileFilter (OpenFL), it works fine, but if I want to browse for multiple image extensions, it just doesn’t work. I tried

  • jpg;jpeg;png
  • JPG;JPEG;PNG
  • *.jpg;*.jpeg;*.png
  • .jpg;.jpeg;.png
  • .jpeg,.jpeg,.png
  • jpg,jpeg,png

None of these seem to be working even with FileFilter.macType.

Anyone managed to open a file dialog with multiple extensions? I’d really like to avoid having 3 menu buttons for 3 file types (jpg, jpeg, png) for Mac users.

Thank you

I don’t have an answer to your question about multiple file extensions (it’s probably a bug), but I just wanted to clarify that FileFilter.macType should not be used in OpenFL code. It’s a legacy API inherited from Flash that is specifically for Classic MacOS (in other words, Macs that are so old that they don’t even run OS X). It has zero effect in OpenFL code because OpenFL doesn’t run on such an old operating system. On all platforms, including macOS, you should use the file extension for filtering by type.

Yeah, I noticed that looking into those libs.