I’m sorry to say that it works correctly using Xojo 2024r2 (I will update today) and macOS 14.6
The only problem I have is what I wrote in another thread, if instead of using the suggested name ‘MyFile.sqlite’ I display the folder files and single click one, the file is saved without extension and no file removed (because is trying to delete a file without extension that it doesn’t exist).
Yes, this is with a different computer than yesterday (home vs office).
@Enric_Herrera I’m sorry if you already posted this information but what OS version are you using?
I tested with macOS 13.6.8 and 14.6, sorry I don’t have 14.5 to test, it will be strange that is the problem but your last demo is working here. Sorry.
If the folder that you’re working in is part of the user’s iCloud account and iCloud syncing is turned on, you could be running into a locking issue. What I mean is that removing a file doesn’t mean that it’s actually gone away immediately even though it visually disappears in Finder, and the location may be “locked” for a short period while the process finishes.
This is the same reason it’s so bad to save Xojo projects into Dropbox folders. The wonky locking almost always bites you when you least expect it.
More info, the Xojo example Files/copy and move (and official example from Xojo)
If you execute the Create copy, delete twice the second one crashes IOException , because the file created at the desktop already exists (Copy and Move Text File1.txt).
Same happens with the Create and move button code.