dropping to the Finder

Jeff Massung massung at gmail.com
Fri Feb 26 12:11:38 EST 2010


On Fri, Feb 26, 2010 at 10:46 AM, Richard Gaskin <ambassador at fourthworld.com
> wrote:

> Jeff Massung wrote:
>
>  On Fri, Feb 26, 2010 at 10:12 AM, Richard Gaskin wrote:
>>
>>> In one of my apps I have a list of things I'd like folks to be able to
>>> drag
>>> to the Finder, and then when they're dropped I'll assemble the needed
>>> parts
>>> and write them to a file at the drag destination.
>>>
>>> I can't figure out how to get the path where the user dropped.
>>>
>>
>> To my knowledge that's impossible (on every OS). As I understand the
>> drag/drop paradigm, you can't see where something is dropped to if the
>> target is another application.
>>
>
> But as Jan suggested, how do most FTP clients work?  In Interarchy I can
> drop to any folder and it works great.  I'd like to be able to do something
> similar - there must be a way.
>


Sorry, Richard, perhaps I'm misunderstanding, but most FTP clients aren't
doing anything special that I'm aware of. Usually it's the target
application's responsibility to know what to do with whatever is dropped on
it.

I was under the impression that you wanted to know where it was dropped and
then begin to do some work (like combing all the files into a single zip)
and then perform the transfer.

As an example of what I'm thinking, if I browse to an image in FireFox, and
then drag the image to my desktop, FireFox isn't doing anything here (that
I'm aware of) other than creating a drag object containing data that points
to the image's URL. Explorer (or the Finder on Mac) is then responsible for
accepting the drag data of that type and handling it appropriately (in this
case, starting either a download or creating an alias/shortcut to the
hyperlink location).

This is my very cursory understanding of this, though. I haven't worked with
a lot of FTP clients, and the ones I have had 2 directory trees: local and
report, and I dragged and dropped within the application.

On Win32 I know you can also hook into the messages sent to another
window/process (not sure about OS X). It's possible some of the applications
you have used in the past do this and when they receive a remote file drop
event they end up sending a message back to the main application to initiate
the transfer.

Jeff M.



More information about the use-livecode mailing list