• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSOutlineView and drag-to-trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSOutlineView and NSTreeController
  • Next by Date: Bindings Sample code / Suggested reading
  • Previous by thread: IB fetchPredicate pass in value
  • Next by thread: Bindings Sample code / Suggested reading
  • Index(es):
    • Date
    • Thread