Dragging Promised Files

Yes, I put this back…

DragItem states:

[code]Dragging Promised Files

MacOS supports the concept of dragging a file before it actually exists in the file system. It could be a new document that hasn’t been saved yet or a file that exists on a remote server or on the web.

In these cases, the drag and drop gesture serves the purpose of specifying the location at which to save the new file. When the drag and drop operation is complete, it tells the source where it wants the files saved and the dragging source creates the files. This special type of file drag is called a promise because the drag operation contains a promise from the source to the destination that the source will create the specified files if the drag and drop is accepted.

To drag and drop promised files, call the RectControl or Window’s AcceptRawDataDrop method with “phfs”; as the data type. When an application that sends file promises is dropped on your application, you will find a FolderItem in the dragged item. Usually this will point to a file in the TemporaryItems folder and you should ordinarily delete it when you are finished with it.[/code]

Nice !

But how do I Usually this will point to a file in the TemporaryItems folder and you should ordinarily delete it when you are finished with it. delete the file there ?

Also, my project runs on Linux and Windows and I drag the result artwork onto the Desktop (and that work nicely).

when you are done with the file you got, you can delete it.

f.delete

where f is a folder item.