Hide Extension/Extension Visible

I am trying to use the following in my Save Dialog to Hide the extension

f.ExtensionVisible = false

When I click the Hide Extension checkbox in the dialog is that suppose to be automated ie should it remove the extension in the currently displayed suggested file name?

Thanks

This is an extension of the FileTypes bug. (intentional pun)
Define the file type before you use the save dialog as an object in that method, rather than using the global FileTypes object, and most of your problems go away.

dim ftMine as new FileType
ftMine.Name = "Mine"
ftMine.Extensions = ".ext"

dim oDlg as new SaveAsDialog
oDlg.Filter = ftMine

Still seems to be a problem

Since this is a preference of the finder, intended to be set by the user, I would not use that feature which will mess up with the behavior expected by the user. But that’s me…

Incidentally, this note in the LR may also explain your issue :

Note that when you change this setting, the operating system’s Desktop Manager or subsequent Navigation dialogs may not reflect the change right away. When you create a new file under macOS, the “hide extension” flag is set according to the current value of this property.

That’s what I originally thought he meant, but after writing up the whole “don’t mess with people’s systems” post, I re-read and now think he was talking about the checkbox in the Save Dialog in the bottom left that lets you toggle the extension visibility there. My fix does correct this misbehavior, and is not relating to the system extensions display setting.

Edit:

Also good to see you again :slight_smile:

Correct Tim, I was referring to Hide Extensions in your diagram not working when selected with the suggested file name I insert in the SaveAs Field

Related, but not to the op question:

Setting “Hide Extensions” in the Finder simply… hides the extension(s) for the newly created files, not for all existing files (as far as I saw recently, but I do not PowerOff / Boot to check what happens then).