Yes, Quit Xojo and started again, rebooted laptop completely, and still shows extension.
Have I got extension visible statement in wrong place? maybe and example?
Thanks Greg, I suspect my extension visible statement is in wrong place? an example maybe? I know its basic but Iâm stuck here with something I know is simple.
Aha. In finder, using âget infoâ I see the âHide extensionâ is not set, and doing this, does in fact hide the extension immediately. So, its my code, Iâm not doing this in the right place somehow. Can you help PLEASE?
Iâm not sure you can tell the Finder to hide extensions from within a Xojo app. Not easily, anyway. Not using standard Xojo code. The extension is part of the filename, so youâll have to keep adding that if that is what you want the files to have.
I donât use extensions for the usersâ databases, personally, but then thereâs no reason for them to ever see them.
I thought this was a system wide setting?
ie you see extensions or you dont, rather than âdont show extensions just for Billâs filesâ
OSX used to use hidden settings to determine a file type, and didnt need extensions at all.
When they moved to extensions, they became more like Windows, and then had âhide extensionsâ to make it look like a Mac again.
Whats wrong with seeing the extension?
And I am slightly puzzled as to what more the OP needs.
-
Have my SQLite databases show my logo: CHECK
-
Donât show the extension in the Finder: CHECK
What else is there?
This is all I did:
Dim f As FolderItem = SpecialFolder.Desktop.Child("test.txt")
Dim tos As TextOutputStream = TextOutputStream.Create(f)
tos.WriteLine "hello world"
tos.Close
f.ExtensionVisible = False
and it works as expected on my machine. Set it to True and the file has an extension. Set it to False and it doesnât.
2020r2.1 running on macOS Big Sur.
Greg, Thank you for this. I see what youâve done and thought it the same as my code, but the difference is you have done f.extensionvisible = false AFTER a write to to the file. Is that the key to this, or does it also work just after⊠Dim f As FolderItem = SpecialFolder.Desktop.Child(âtest.txtâ) ?
I mentioned this above
Works perfectly now, so thank you Greg for your patience and support.