Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does deprecated Drag Manager API SetDragItemFlavorData() still work with "typeFileURL" flavor type on Leopard OS?



It should continue to work. It's possible Finder is interpreting your URL slightly differently on Leopard than Tiger. Are you sure you're providing the same URL data? What does the data look like when dragged to Pasteboard Peeker? Is it different on Tiger and Leopard?

http://developer.apple.com/samplecode/PasteboardPeeker/index.html#//apple_ref/doc/uid/DTS10000672


On Apr 7, 2008, at 5:06 PM, Guangxing Li wrote:

Hi,

I understand that this API is deprecated starting from Leopard but it is too much for me to change the code to use the Pasteboard Manager API right now. My code works fine on Tiger but fails to work on Leopard with "typeFileURL" flavor. It works fine with other flavor types, such as "kScrapFlavorTypePicture", "kScrapFlavorTypeText" etc.

Here is what I am doing in my code.
1. Add "typeFileURL" flavor after I created Drag reference object like this:
        AddDragItemFlavor(mDragRef, itemRef, typeFileURL, NULL, 0, 0);
2. In the DragSendData callback later one, my code does receive the request for "typeFileURL" flavor data and I set the data like this:

SetDragItemFlavorData(mDragRef, itemRef, typeFileURL, fileURL, urlLen, 0);

This works fine on Tiger but not on Leopard. On Leopard, I always get the stop icon and cannot drop the file to the Finder.

Does anyone have idea what is wrong? Do I have to change my code to use the Pasteboard Manager API  to get it work on Leopard also?

Thanks.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Does deprecated Drag Manager API SetDragItemFlavorData() still work with "typeFileURL" flavor type on Leopard OS? (From: "Guangxing Li" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.