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: Re[6]: drag promised files to Finder




On Jun 29, 2007, at 3:01 AM, Eric Landuyt wrote:

Hello Bryan,

Wednesday, June 27, 2007, 8:44:51 PM, you wrote:
BP> Everything you're doing at this point sounds right. No need to pass
BP> NULL data for the PromiseHFSFlavor structure. That can be added
BP> straight on. I'm surprised Finder doesn't seem to be setting the
BP> location to the pasteboard. Any chance you could send me some sample
BP> code that reproduces the problem? I could take a look and see what's
BP> going on.


After a more deeper investigation, I got it working. As I'm hacking this into
Qt, I was trying to minimize things to patch in their code, so I was using
PasteboardCreate(NULL) in order to obtain the exact same global pasteboard
they were using in their code (based on what's described at
http://developer.apple.com/documentation/Carbon/Reference/Pasteboard_Reference/Reference/reference.html#/ /apple_ref/c/func/PasteboardCreate
). However, it seems I was in fact not obtaining the same pasteboard, but a
different one? (at least it's the only explanation I have at the moment).
So I tried to export the exact PasteboardRef Qt is using internally, replaced
my PasteboardCreate() calls by this ref, and now it works perfectly!

Excellent! I'm glad you got things working. Yes, PasteboardCreate( NULL ) is equivalent to PasteboardCreate( kPasteboardUniqueName ). This will give you a completely new, unique pasteboard. Probably not what you want. In general, you can get the drag pasteboard via GetDragPasteboard in Drag.h.




Btw, is is possible to reuse Finder's own copy dialog box in order to display
progress for the files I'm copying (through a particular AppleEvent?),
or am I forced to manually reimplement the same thing in my application?

I believe there are AppleEvents for this. Try looking at Finder with Script Editor to see what AppleEvent services it offers.
_______________________________________________
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: 
 >drag promised files to Finder (From: Eric Landuyt <email@hidden>)
 >Re: drag promised files to Finder (From: Bryan Prusha <email@hidden>)
 >Re[2]: drag promised files to Finder (From: Eric Landuyt <email@hidden>)
 >Re: Re[2]: drag promised files to Finder (From: Bryan Prusha <email@hidden>)
 >Re[4]: drag promised files to Finder (From: Eric Landuyt <email@hidden>)
 >Re[6]: drag promised files to Finder (From: Eric Landuyt <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.