Drag OUT of Revolution?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

Drag OUT of Revolution?

Post by AlexAdams » Wed Oct 14, 2009 1:34 am

I want to drag an icon from stacks in my app to someplace on in a file system directory, retreive the path of that location and use that information to copy a file there.

How can I get the destination outside Rev?

Thanks,
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed Oct 14, 2009 6:24 am

I'm afraid you can't do it that way. The simplest solution is to write the file to the temp-directory and setting the dragData["files"] to the path of this temporary file. Of course, you should clean up those temporary files upon application exit.

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Wed Oct 14, 2009 9:15 am

Hi Alex,

yes Jan is true, but his workaround is great!
I also use this and found that this is fast enough for files up to about 5 MB!


Best

Klaus

AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

Post by AlexAdams » Wed Oct 14, 2009 4:09 pm

Jan and Klaus,

I think I'll just ask the user where they want the file and put it there. I have the files stored in directories controlled by the app (later they will be in database BLOBs). They are renamed in a predictable manner when stored. I wanted to offer an option to the user to just drag and drop, but I guess not.

Thanks for your help,
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

Post Reply