On May 16, 2010, at 9:19 AM, ronald b. kopelman wrote:
>       I am designing a small app that will accept a dropped folder, get its 
> name & process it. Everything works fine. I can drop a folder on the dock 
> icon or the app icon & get exactly what I want. I would like to drop the 
> folder onto the app window while the app is running & get the same result but 
> I can't figure out how to drop the folder onto the window. I had thought 
> about subclassing the window's content view but, yuch, there must be a better 
> way. I have perused the literature & if something is there I have missed it. 
> Is there some way I can drop a folder onto a window or its content view & get 
> the name of the folder? Please point me in the right direction.

[forgot to copy the list]

The process is the same for window or view, basically just need to implement 
the NSDraggingDestination protocol and register the dragging types your 
interested in. The advantage of adding dragging support to the window is that 
you can drop your folder onto anything inside the window.

The drag and drop guide is very good, start here:

<http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/DragandDrop/DragandDrop.html#//apple_ref/doc/uid/10000069i>

File dragging got its own chapter:

<http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/DragandDrop/Tasks/DraggingFiles.html#//apple_ref/doc/uid/20001288-CEGJFDFG>

Regards
Markus
--
__________________________________________
Markus Spoettl

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to