Hi,
I have an NSOutlineView with drag and drop. I want to add NSFilesPromisePboardType as a dragtype. However, based on which modifer key is pressed at the time of drop (e.g. in the finder), I want to create different files and different filecontent. This should be possible, since I keep a pointer to the dragged data around (i.e. the data is not written to the pasteboard directly).
According to the docs, I should implement this function.
But it's not telling what kind of NSDragoperation (generic/move/copy/... as determined by the modifer keys such as command and option) was performed.
If I drag, I want to create a file with the original, imported content.
If I command-drag, or option-drag, I want to create a file which has new, derived content.
Is there a way around this?
Thanks
I have an NSOutlineView with drag and drop. I want to add NSFilesPromisePboardType as a dragtype. However, based on which modifer key is pressed at the time of drop (e.g. in the finder), I want to create different files and different filecontent. This should be possible, since I keep a pointer to the dragged data around (i.e. the data is not written to the pasteboard directly).
According to the docs, I should implement this function.
Code:
-(NSArray *) outlineView:(NSOutlineView *)outlineView namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination forDraggedItems:(NSArray *)items
But it's not telling what kind of NSDragoperation (generic/move/copy/... as determined by the modifer keys such as command and option) was performed.
If I drag, I want to create a file with the original, imported content.
If I command-drag, or option-drag, I want to create a file which has new, derived content.
Is there a way around this?
Thanks