Hey,
I'm trying to create an app that will have a NSCollectionView. I need to be to drag an item from the collection view to another app/desktop/Finder window.
I've implemented the dragging methods, but I'm struggling on this one:
I tried this code
But when I drag the item to the desktop, just a text clip is copied. If I remove the second like, nothing is copied. What an I doing wrong?
I'm trying to create an app that will have a NSCollectionView. I need to be to drag an item from the collection view to another app/desktop/Finder window.
I've implemented the dragging methods, but I'm struggling on this one:
Code:
-(BOOL)collectionView:(NSCollectionView *)collectionVie writeItemsAtIndexes:(NSIndexSet *)indexes toPasteboard:(NSPasteboard *)pasteboard
I tried this code
Code:
[pasteboard readFileContentsType:nil toFile:location];
[pasteboard setString:str forType:NSPasteboardTypeString];
But when I drag the item to the desktop, just a text clip is copied. If I remove the second like, nothing is copied. What an I doing wrong?