File Extension not set in the Save Dialog

I do not know what I’ve changed recently, but my csv files does not more have the extension set in the Save As… Dialog.

The file type definition is:

[code]CSV
Display Name: Comma Delimited Value (CSV)
Description:
UTI Identifier: public.comma-separated-values-text
Conforms To:

Extensions: .csv
Mime Types:
OS Types: ???
UTI Type: • Imported[/code]

I provided an Icon for this file type.

Nota: AppleScript (return properties of MyFile) returns

file type:"TEXT", creator type:"ttxt",

Xojo 2016r4.1
El Capitan .6

[Edit] I forgot: I use TextOutputStream to save the data into a csv file.

It’s the FileTypes issue that comes up every so often.
Define your file type in code in the method right before the SaveDialog and it will work properly.
It’s related to <https://xojo.com/issue/45392> which is just the FileTypes bug getting wildly out of hand.

I think I’ve always just renamed the file using name = name + “.csv”

Tim, Jym,

Thank you. I will read and try.

Jym,

your code leads me to use:

f.MacCreator = "????" f.MacType = "????"

and it works (on El Capitan .6).

Now, I have to check what happens on Windows.

PS: I also use your trick (I am ashamed: usually I think at that all by myself !).