Re: Newbie - Finder Files Drag & Drop In Cocoa
Re: Newbie - Finder Files Drag & Drop In Cocoa
- Subject: Re: Newbie - Finder Files Drag & Drop In Cocoa
- From: Christopher Corbell <email@hidden>
- Date: Thu, 30 Oct 2003 21:24:25 -0800
On Thursday, October 30, 2003, at 05:52 PM, OL&L Dev wrote:
Can someone tell me how to easily implement Finder drag & drop of
files onto a Cocoa app? Basically I just want to receive files or
folders dropped onto my app, then call one routine on each item
dropped to do some simple processing.
Thanks,
James
The Cocoa drag-and-drop handling is described in "Drag and Drop"
which is under "Events and Other Input" on the main Cocoa help
page in Developer Help.
Online this document is available at
http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/
Essentially you have a view which is a dragging destination &
implements some protocol methods. It needs to register for dragged
types (in your case, files) and know how to get them from the
pasteboard when a drop occurs. The document covers all of this
in detail with source examples.
hth,
Christopher
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.