Drag types from iTunes

  • Does anyone know how to receive drags from iTunes in an NSView?  It must
    be possible, since the Finder receives drags from iTunes.  The problem
    is, obviously, figuring out what drag types to register the NSView to
    receive.  (Why there is no way to register for all drag types is beyond
    me).

    In any case, I've tried registering for every defined NS*Type.
    Investigation into the types iTunes uses when copying (not dragging)
    yields the types below.  Even though the NSStringPboardType looks
    promising, it's doesn't work (and again, this is copying, and not
    dragging).  Even if I register for any of the obscure types like
    "CorePasteboardFlavorType 0x75747874", I still cannot receive drags.

    So, does anyone have any idea??

    Thanks,
    Dave

    [[NSPasteboard generalPasteboard] types] yields the following after
    copying an item in iTunes:

    <CFArray 0x2391c00 [0x8016024c]>{type = mutable-small, count = 6,
    values = (
    0 : <CFString 0x238b340 [0x8016024c]>{contents =
    "CorePasteboardFlavorType 0x75747874"}
    1 : <CFString 0x2391c20 [0x8016024c]>{contents = "NeXT plain ascii
    pasteboard type"}
    2 : <CFString 0x2391c50 [0x8016024c]>{contents =
    "CorePasteboardFlavorType 0x54455854"}
    3 : <CFString 0x2391c90 [0x8016024c]>{contents = "Apple
    CorePasteboard Fallback Text Script"}
    4 : NSStringPboardType
    5 : NSStringPboardType
    )

    Dave Watanabe
    sciforums.com | webfansite.com | xlife.org
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.
  • I'm pretty sure all those types you saw on the generalPasteboard were
    for text... 0x75747874 is utxt and 0x54455854 is TEXT.

    I was surprised to see that they don't put any of the common types on
    the pboard.

    In my app DropZone, I check for NSStringPboardType,
    NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
    NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
    NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
    NSRTFDPboardType, NSPICTPboardType, NSURLPboardType, NSPDFPboardType,
    @"Apple CorePasteboard Fallback Text Script", @"Apple URL pasteboard
    type", @"NeXT filename pasteboard type", @"NeXT plain ascii pasteboard
    type", @"Apple Uniform Resource Locator (file)", and the
    CorePasteboardFlavorType's for 'utxt', 'TEXT', 'node', 'prxy', 'hfs ',
    'furl'...

    but none of those got a hit from the iTunes drag...  the 'hfs ' one
    tends to be how Finder drags work...

    the contents of the text buffer when you paste it, is a tab separated
    row from the faux NSTableView in iTunes.

    like this: "Gin and Juice    Dr. Dre and Snoop Doggie Dog    3:31    2.9 MB    Rap            1/
    5/02 8:07 PM    12/30/01 1:01 AM        MPEG audio file            112 kbps"

    Let us know if you find out what pasteboard iTunes is using to talk to
    finder...

    On Sunday, March 3, 2002, at 03:05  AM, David Watanabe wrote:

    > Does anyone know how to receive drags from iTunes in an NSView?  It
    > must be possible, since the Finder receives drags from iTunes.  The
    > problem is, obviously, figuring out what drag types to register the
    > NSView to receive.  (Why there is no way to register for all drag types
    > is beyond me).
    >
    > In any case, I've tried registering for every defined NS*Type.
    > Investigation into the types iTunes uses when copying (not dragging)
    > yields the types below.  Even though the NSStringPboardType looks
    > promising, it's doesn't work (and again, this is copying, and not
    > dragging).  Even if I register for any of the obscure types like
    > "CorePasteboardFlavorType 0x75747874", I still cannot receive drags.
    >
    > So, does anyone have any idea??
    >
    > Thanks,
    > Dave
    >
    > [[NSPasteboard generalPasteboard] types] yields the following after
    > copying an item in iTunes:
    >
    > <CFArray 0x2391c00 [0x8016024c]>{type = mutable-small, count = 6,
    > values = (
    > 0 : <CFString 0x238b340 [0x8016024c]>{contents =
    > "CorePasteboardFlavorType 0x75747874"}
    > 1 : <CFString 0x2391c20 [0x8016024c]>{contents = "NeXT plain ascii
    > pasteboard type"}
    > 2 : <CFString 0x2391c50 [0x8016024c]>{contents =
    > "CorePasteboardFlavorType 0x54455854"}
    > 3 : <CFString 0x2391c90 [0x8016024c]>{contents = "Apple
    > CorePasteboard Fallback Text Script"}
    > 4 : NSStringPboardType
    > 5 : NSStringPboardType
    > )
    >
    > Dave Watanabe
    > sciforums.com | webfansite.com | xlife.org
    > _______________________________________________
    > cocoa-dev mailing list | <cocoa-dev...>
    > Help/Unsubscribe/Archives:
    > http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    > Do not post admin requests to the list. They will be ignored.
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.
  • I just checked and the NSDragPboard is unchanged after a drag in iTunes,
    they must be using some private carbonesque method for talking to finder.

    On Sunday, March 3, 2002, at 03:05  AM, David Watanabe wrote:

    > Does anyone know how to receive drags from iTunes in an NSView?  It
    > must be possible, since the Finder receives drags from iTunes.  The
    > problem is, obviously, figuring out what drag types to register the
    > NSView to receive.  (Why there is no way to register for all drag types
    > is beyond me).
    >
    > In any case, I've tried registering for every defined NS*Type.
    > Investigation into the types iTunes uses when copying (not dragging)
    > yields the types below.  Even though the NSStringPboardType looks
    > promising, it's doesn't work (and again, this is copying, and not
    > dragging).  Even if I register for any of the obscure types like
    > "CorePasteboardFlavorType 0x75747874", I still cannot receive drags.
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.
  • On Sunday, March 3, 2002, at 02:10  pm, <tom_waters...> wrote:

    > In my app DropZone, I check for NSStringPboardType,
    > NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
    > NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
    > NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
    > NSRTFDPboardType, NSPICTPboardType, NSURLPboardType, NSPDFPboardType,
    > @"Apple CorePasteboard Fallback Text Script", @"Apple URL pasteboard
    > type", @"NeXT filename pasteboard type", @"NeXT plain ascii pasteboard
    > type", @"Apple Uniform Resource Locator (file)", and the
    > CorePasteboardFlavorType's for 'utxt', 'TEXT', 'node', 'prxy', 'hfs ',
    > 'furl'...

    Eeek!

    You ought to try 'phfs' the HFS promise flavour. That's what iTunes sends
    out.

    Nicholas Shanks
    --

    http://nickshanks.com/
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.
previous month march 2002 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Go to today