• 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: Aalok <email@hidden>
  • Date: Wed, 31 May 2006 19:12:54 +0530

Hi!

I have tried to use NSFilesPromisePboardType to capture a drag and
drop event onto my application's window. However, I am not able to
extract the file name when a song from my iTunes playlist is dragged
and dropped on to the window. With NSFilenamesPboardType I am able
able to get the filenames when a file is dragged and dropped from
Finder, but the same isn't happening with the iTunes songs.

Any clue, help is highly appreciated!

Regards,
Aalok


On 5/25/06, Sean Murphy <email@hidden> wrote:

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





--
Tata Consultacy Services
Voice:- (091) 9850984395
_______________________________________________
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


References: 
 >Drag & Drop iTunes tracks and Playlists (From: Aalok <email@hidden>)
 >Re: Drag & Drop iTunes tracks and Playlists (From: Sean Murphy <email@hidden>)

  • Prev by Date: Re: Use of weak reference in non-circular reference situation
  • Next by Date: Re: Problem subclassing a NSCell in a NSTableView (solution)
  • Previous by thread: Re: Drag & Drop iTunes tracks and Playlists
  • Next by thread: Newbie Q: Bindings
  • Index(es):
    • Date
    • Thread