Oh I agree that the modern pasteboard API is much more pleasant! (if a little confusing at first).
I guess the big problem I have with drag and drop right now is the async nature of the Flickr parser in particular. From a naive client’s point of view, the only usable pasteboard type available to it is a local URL/path. iMedia has to create the file at that location on-demand. And then tidy it up at some point. Presently, the Flickr parser relies until on the OS rebooting to perform that cleanup.
There may well be other parsers in a similar situation, but none come to mind.
It seems to me that either file promises, or promising image data, fall better inline with how the pasteboard operates on OS X. Drag/paste recipients get some of the async/lazy benefit our custom system offers. Although with the caveats:
- file promises tend to be synchronously fulfilled in practice, but there is no requirement to do so
- when asynchronously fulfilled, file promises have no means to notify clients when finished
- promised image data must be provided synchronously
Some effects can be minimised by assuming at the start of a drag or copy operation that the resulting data *will* eventually be used. Therefore loading the image can begin immediately, with a good chance it will be finished by the time the drop or paste actually occurs. This should lower the waiting time in target apps.
Do we do this for drags at all in iMedia 3? Or do we still wait until the system asks a promise be fulfilled? (i.e. upon the paste or drop)