dropping to the Finder

Jan Schenkel janschenkel at yahoo.com
Fri Feb 26 10:20:54 CST 2010


--- On Fri, 2/26/10, Richard Gaskin <ambassador at fourthworld.com> 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.
> 
> Did I miss something obvious?  I hope so.
> 
> TIA -
> 
> --
>  Richard Gaskin
> 

Unfortunately, you can't get the drag destination for such a drag'n'drop operation.
The only workaround I've found so far, is to actually already write the data to a temporary file in the dragStart event, and set the dragData["file"] to the path of this temporary file - finally, in dragEnd, check if the temp file is still there and delete it.

While that's ok for small data files, it makes it difficult to write an FTP client where the user can drag a remote file to his local machine...

Jan Schenkel
=====
Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


      




More information about the use-livecode mailing list