i am trying to get drag and drop working in xcode 3.1.4 on osx/leopard. any pointers or hints or maybe even example code? i cannot find anything out there and it is really disappointing. i want to have the interface respond if files are dragged on the main window.
9
votes
As you didn't tell us which framework you are using, I assumed you are working with Cocoa. I re-tagged your question to reach a broader audience. (Most people check the "Cocoa" tag when searching for Mac OS X programming questions)
– Thomas Zoechling
More to the point, most people check the Cocoa tag when looking for Cocoa questions to answer, and the IDE you're using (Xcode) is quite irrelevant to the solution, which involves the framework you're using.
– Peter Hosey
1 Answers
16
votes
To register a window or view as a dragging destination, use the registerForDraggedTypes: method of NSWindow or NSView.
You can find further details in the Getting Started with Drag and Drop Programming guide on developer.apple.com