How do I get information why
NSWorkspaceMBS.performFileOperation(NSWorkspaceMBS.NSWorkspaceRecycleOperation, source, dest, files, tag)
fails?
How do I get information why
NSWorkspaceMBS.performFileOperation(NSWorkspaceMBS.NSWorkspaceRecycleOperation, source, dest, files, tag)
fails?
Christian advised me today to start my App via the Terminal to maybe see issues i can’t catch otherwise. Maybe this could help here too?
I got 3 reports from customers today about this issue.
What value does Tag have in that case?
Maybe it runs asynchronously.
I think that the code is mostly out of an example:
if fileToDelete = Nil or not fileToDelete.Exists then Return False
dim tag as Integer
dim source,dest as FolderItem
source = fileToDelete.Parent
dim files(-1) as string
files.Append fileToDelete.name
dim b as Boolean = NSWorkspaceMBS.performFileOperation(NSWorkspaceMBS.NSWorkspaceRecycleOperation, source, dest, files, tag)
if not b then Globals.theErrorLog.LogItem "It wasn't possible to delete the file " + fileToDelete.NativePath
Return b
One user had his archive in a Boxcryptor folder.
I am sorry to report, that it’s deprecated (Since 10.11 El Cap) and therefore cannot be trusted to work.
You should seek an alternative function.