Opening custom files by Drag and Drop in standalone application

Alejandro Tejada capellan2000 at yahoo.com
Fri Jan 21 11:13:49 EST 2005


Hi Developers,

Before sending an attachment to bugzilla,
i want to recap the whole issue, for your
additions, confirmations and corrections:

Begin Report

Problem:
When i drag and drop a Rev or MC stack to a
Windows standalone i had created, it opens the
application and the stack dropped over
the executable.

Workaround:
(posted by Frank D. Engels jr.)
Under Windows, you would need to check 
the $1 variable when starting
the standalone, if a stack is
specified, close it right away, 
display an error message, and quit.

(code tested by Alejandro Tejada)

-- use this code in the card script
-- of the first card in the mainstack
-- of the standalone executable

on startup
lock messages 
-- by locking messages, you
-- do not give permission to dropped stacks
-- to execute any script...

if $1 is not empty
then
answer "Please, open this application by double
clicking it's shorcut or the executable file and then
drag and drop your file inside the application's open 
window or click the Open file button within the 
application window."
quit
end if

end startup

Problems of this workaround:
(Ken Ray)
The problem is that the document stack always 
displays before you can do anything about it, 
so it looks funky.

(Alejandro Tejada)
And your file association are rendered
useless, because when you double click
on a document associated to your standalone
application, you trigguer this startup handler
and your application only shows a message and close.

End of Report

What additional information needs this report?

Richard Gaskin wrote:

>This is strange, as I'd thought the only way 
>for an app to be able to open documents dropped 
>on it is to assign acceptable file types to it 
>in the Windows registry.

>If you're not making that registry entry how 
>does the OS know to allow your app to accept 
>drops of those files?

Honestly, i don't know... but in Windows
if i drop a stack over any executable created 
with MC or RR, the stack opens and the application 
is launched.

Richard Gaskin wrote:

>Bugzilla has one of the ugliest UIs ever, 
>but after a few posts it becomes acceptable.

I'll give it a try. :-)

al

=====
Visit my site:
http://www.geocities.com/capellan2000/


	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail


More information about the Use-livecode mailing list