Drag & Drop File/Folder on Rev Standalone Program Icon

Derek Bump webmaster at dreamscapesoftware.com
Mon Nov 8 11:59:07 EST 2004


> That looks good, except how do you handle the case where a file is 
> dropped on the icon of (or its icon double-clicked to be opened with) 
> an OS X app (or classic MacOS app for that matter) when the app is 
> already open?  This script obviously won't work in that particular 
> case; it only makes sense for apps which are being launched as a result 
> of the file being dropped on their icons or double-clicked to open 
> them.

That's a very good question.  That script is what I use in my Windows application when someone drops an image onto the icon for my program.  If the program is already open, it will usually do what most other Windows apps do and launch a new instance of the program.

To counter-act the dropping of files onto my program that is already open, I use drag & drop handlers for the program's window.  This way if someone tries to drop a file onto my program's window, it will open it still.
 

Derek Bump
Dreamscape Software
____________________________________________
Compress Images Easily with JPEGCompress
http://www.dreamscapesoftware.com
 

----- Original Message ----- 
From: "Frank Engel" <fde101 at fjrhome.net>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Monday, November 08, 2004 10:46 AM
Subject: Re: Drag & Drop File/Folder on Rev Standalone Program Icon


> That looks good, except how do you handle the case where a file is 
> dropped on the icon of (or its icon double-clicked to be opened with) 
> an OS X app (or classic MacOS app for that matter) when the app is 
> already open?  This script obviously won't work in that particular 
> case; it only makes sense for apps which are being launched as a result 
> of the file being dropped on their icons or double-clicked to open 
> them.
> 
> On Nov 8, 2004, at 11:27, Derek Bump wrote:
> 
>> Rob,
>>
>> Try this script out.  Works great in my software.
>>
>> global droppedImage
>>
>> on startup
>>    put $1 into droppedImage
>> end startup
>>
>> on openStack
>>    if droppedImage is not empty then doOpenFile droppedImage
>> end openStack
>>
>>
>>
>> Derek Bump
>> Dreamscape Software
>> ____________________________________________
>> Compress Images Easily with JPEGCompress
>> http://www.dreamscapesoftware.com
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
> -----------------------------------------------------------
> Frank D. Engel, Jr.  <fde101 at fjrhome.net>
> 
> $ ln -s /usr/share/kjvbible /usr/manual
> $ true | cat /usr/manual | grep "John 3:16"
> John 3:16 For God so loved the world, that he gave his only begotten 
> Son, that whosoever believeth in him should not perish, but have 
> everlasting life.
> $
> 
> 
> 
> ___________________________________________________________
> $0 Web Hosting with up to 120MB web space, 1000 MB Transfer
> 10 Personalized POP and Web E-mail Accounts, and much more.
> Signup at www.doteasy.com
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>


More information about the use-livecode mailing list