dropping to the Finder
Jim Ault
jimaultwins at yahoo.com
Fri Feb 26 15:52:58 EST 2010
On Feb 26, 2010, at 10:22 AM, Richard Gaskin wrote:
> I've used a few like that myself (GoLive and FileZilla work that
> way). It may be just a Mac convention that supports this so well,
> but I use Interarchy for FTP and it does a wonderful job of behaving
> Finder-like: I just drag the file name from its listing into the
> Finder and it starts the download. Beautiful, simple, lets the user
> interact with their files directly in the context they're most
> familiar with.
This is true Richard, but the Interarchy drag-drop interface drops
data that is recognized by the accepting app, such as the Finder, that
matches what the Finder is expecting. In the case of moving files, it
would be the full path and it triggers the 'move file command' if on
the same drive, and 'copy file command' if on different volumes or
servers.
You task is more complex. You are saying that you want your app to
receive a report back from the Finder that contains the location the
user chose. This is not the normal semaphore unless you use
AppleScripting (which is Mac only of course). Beyond that, you want
is to do work that the destination app may not understand, such as
build a text file and save it.
As far as file listings, the [ls] command can be 'piped' to a text
file on the hard drive or an environmental memory variable for access
by your app. The [ls] command will produce a list, and if you use
Google, I am sure you can locate a directory walk script out there
somewhere.
My take would be that the user defines the destination by drag-drop to
your app, then you check permissions, and go forth.
Hope this helps
Jim Ault
Las Vegas
More information about the use-livecode
mailing list