.Icon Property is always Nil.
Nota: the csv files have a default icon set by macOS, and I added a custom one for the test…
// This MessageBox is to be sure the FileType “exists”…
MessageBox "csvType.Name: " + EndOfLine + EndOfLine + csvType.Name
// Then, some lines below:
If csvType.Icon <> Nil Then
So… is this macOS? If so, are you trying to declare csv as your own data type?
IIRC the Icon property will only ever have a value on macOS and only if the “file type is unique to this app” box is checked.
Apparently, only with a File Type Group [FTG] (the graphical one).
I used the declared by Code.
I will try (later) the FTG just to see how that works…
Thanks for the hint.
PS: I played with the graphic interface, and after a while, Xojo 2021r2.1 crashed (but I was not able to make it work: Icon was Nil all the time).
I will try with 2022r3…