Drag file "promises" (an unfortunately overridden word) are still a
little overly complex. I have ideas to address this in a future
release but some of the issues involved are... subtle. =) Here's a
link to documentation that should help you with understanding the
current model.
You need to set the DropLocation so the sending application knows
where to place the newly minted file. Then you can call in their
promise to kDragFlavorTypeHFS to the the real file data.
In this case, their app is responsible for the location of the file.
Their app has a database of images. When they drag one to our app,
they'll be responsible for creating an actual file on the server from
the data in their db. A reference to this file will be given to our
app in the drag receiver. So do we still need to call
SetDropLocation, but with an empty file or an AEDesc of typeNull or
some such thing?
The flavorDataPromised flag is set automatically by the system when
a flavor is promised with NULL data. Requesting both flavor types
are in the proper order is required for the full "promised file"
handshake to be complete. This is why things are a little complex.
Take a look at the documentation I provided above for more details.
So our tracking handler should look for kDragFlavorTypePromiseHFS
first. If that's not found, we'll look for kDragFlavorTypeHFS like
before.
Then in our receive handler, we should ask for the
kDragFlavorTypePromiseHFS data (store it in a PromiseHFSFlavor), then
ask for a flavor of type promise.promisedFlavor, and that will cause
them to fill in an actual file reference that we'll then get?
_______________________________________________
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