So far I have used the code from the documentation of
SaveFileDialog (https://docs.xojo.com/SaveFileDialog) to call the other correct method based on the file extension. This also works without problems under macOS/Windows.
Then yesterday, I tried the code on Linux (Mint 19.2, Fedora 28, Deepin 15.11, Elementary) and found that the code does not fire because
FolderItem.Name is returned without a file extension despite the file extension being set (dropdown list in dialog). Does anyone have a suggestion on how I can achieve consistency on Linux?
Var dlg As New SaveFileDialog dlg.InitialFolder = SpecialFolder.Desktop dlg.Filter = FileTypeGroup1.Pdf + FileTypeGroup1.PlainText Var file As FolderItem file = dlg.ShowModalWithin(Self) If Not (file Is Nil) Then #Pragma Warning "Linux does not add the extension in file.Name - So Action-Event doesn't work." Var sName As String = file.Name If sName.Right(3) = "pdf" Then ' PDF Method ElseIf sName.Right(3) = "txt" Then ' TXT Method End If End If