Nothing is consistent there on what works between the platforms…
This code works on Windows and Mac but not Linux
var ftype as FileType = new FileType()
ftype.Extensions = ".png"
ftype.Name = "PNG"
var f as FolderItem = FolderItem.ShowOpenFileDialog(ftype)
This code works on Windows, Mac and Linux
var ftype as FileType = new FileType()
ftype.Extensions = "png"
ftype.Name = "PNG"
var f as FolderItem = FolderItem.ShowOpenFileDialog(ftype)
This code works on Windows, and Linux but not on Mac
var ftype as FileType = new FileType()
ftype.Extensions = "*"
ftype.Name = "Any"
var f as FolderItem = FolderItem.ShowOpenFileDialog(ftype)
This code works on Windows but not on Linux or Mac
var ftype as FileType = new FileType()
ftype.Extensions = ".*"
ftype.Name = "Any"
var f as FolderItem = FolderItem.ShowOpenFileDialog(ftype)
This code works on Windows but not on Mac (dontk now on Linux)
var ftype as FileType = new FileType()
ftype.Extensions = "*.*"
ftype.Name = "Any"
var f as FolderItem = FolderItem.ShowOpenFileDialog(ftype)
So at this point I have no idea how any is supposed to work on macOS since no combination is working there. But wait… if not doing it in FileType then it happens to work on Mac.
Works on Mac
var f as FolderItem = FolderItem.ShowOpenFileDialog("*.*")
How is this supposed to work is this not unit tested across platforms ? It is very frustrating battling this.
Works pretty much same there since that is only designer on same classes.
But you need to there also be really careful since some things work on some platforms but not on others.
That is the whole point of the story.
Class really should define one way, and make sure any other way does not work on any platform. Since if user has it working on one platform then user will blindly think it works on all platforms.
Daft question: when you say ‘doesnt work’, does it show any PNG files at all on Linux?
because Linux is case sensitive… do your PNG files ending with PNG or png ?
All the files were lower case. And besides removing the dot makes it work on Linux so obviously not case sensitive issue.
I am basically guessing it should be always file ending with no dot or * in-front and for “All” it should be empty string. And then it probably works on all platforms.
This needs to be
Documented
Class should throw exception or things not work on any platforms if anything else is fed to it.