• 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
Re: Drag & Drop iTunes tracks and Playlists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag & Drop iTunes tracks and Playlists


  • Subject: Re: Drag & Drop iTunes tracks and Playlists
  • From: Sean Murphy <email@hidden>
  • Date: Thu, 25 May 2006 14:18:31 -0400


On May 25, 2006, at 9:37 AM, Aalok wrote:

I am developing an application where in I want to drag and drop track
from iTunes to my application icon on the dock. Also drag and drop
should be allowed for playlists in iTunes.
I have tried
- (BOOL)application:(NSApplication *)sender openFiles:(NSArray *) fileName
But it doesn't recognize the file. It simply doesn't go inside this method.

Aalok,

Dragging to an application's dock icon can only dispatch to the NSApp delegate the standard Apple event openFiles, which means the dragging source must have set the pasteboard type to reference actual files and provide their associated path. iTunes, when dragging songs from the library to another application, exports the dragged source into the "TemporaryItems" folder and must register a pasteboard type of something other than the equivalent of just dragging those songs from the Finder.

So, unless you can think of another solution, (like subclassing NSApplication, maybe?), you'll have to stick with using a NSView or NSWindow object to accept the dragged files, since they provide the registerForDraggedTypes: method, which you can tweak to receive the correct type.

-Murph


_______________________________________________ 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
  • Follow-Ups:
    • Re: Drag & Drop iTunes tracks and Playlists
      • From: Aalok <email@hidden>
References: 
 >Drag & Drop iTunes tracks and Playlists (From: Aalok <email@hidden>)

  • Prev by Date: Re: inconsistant AppleScript
  • Next by Date: Re: setState has no effect on an NSButton with value binding?
  • Previous by thread: Drag & Drop iTunes tracks and Playlists
  • Next by thread: Re: Drag & Drop iTunes tracks and Playlists
  • Index(es):
    • Date
    • Thread