NSOutlineView and drag-to-trash
NSOutlineView and drag-to-trash
- Subject: NSOutlineView and drag-to-trash
- From: John Stiles <email@hidden>
- Date: Tue, 2 Aug 2005 15:05:11 -0700
I have implemented an NSOutlineView which looks a bit like a Finder
window in list mode. I can drag files from the tree into a Finder
window, and I can drag files from the Finder into the tree. Now I
want to support dragging an item into the Trash and I don't know how
to make it work. As it stands, a drag into the Trash will create new
files in the Trash :)
I am currently creating the files inside my - (NSArray *) outlineView:
(NSOutlineView *)outlineView namesOfPromisedFilesDroppedAtDestination:
(NSURL *)dropDestination forDraggedItems:(NSArray *)items method. The
docs made me think that I needed to start using -
draggedImage:endedAt:operation: but when I tried changing
namesOfPromisedFilesDroppedAtDestination so that it wouldn't actually
create items, and moved that code into draggedImage, everything broke
(and I started getting NSLog messages about CFURLRef returning an
error).
Does anyone have experience with this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden