Open application when file double clicked

Peter Haworth pete at lcsql.com
Tue Feb 24 16:22:11 EST 2015


Pretty interesting.  I don;t think I launched the app by double clicking it
when I had my debug code in there for "oapp", was always launching it by
double clicking a file associated with it.

I have to step out for a while but will try this scenario here when I get
back.

Even if I do see the oapp event, I wonder tif the data associated with it
includes the path to whatever file was double clicked.

On Tue Feb 24 2015 at 1:13:59 PM Richard Gaskin <ambassador at fourthworld.com>
wrote:

> Wierdness abounds:
>
> I made a standalone with this card script:
>
> on startup
>     insert script of btn "fs" into front
> end startup
>
>
> This script in a button "fs":
>
> on appleEvent
>     put the params &cr & the executionContexts &cr&cr after fld 1
>     pass appleEvent
> end appleEvent
>
> And that same script in the stack.
>
> When I double-click the resulting app, I see:
>
> appleEvent "aevt","oapp",""
> button id 1007 of card id 1002 of stack "/Users/rg/Desktop/ae tester/ae
> tester/ae tester.app/Contents/MacOS/ae tester",appleEvent,2
>
> appleEvent "aevt","oapp",""
> stack "/Users/rg/Desktop/ae tester/ae tester/ae
> tester.app/Contents/MacOS/ae tester",appleEvent,2
>
>
> When I launch the app by dropping a text file onto it (I'd set it up to
> use TEXT/txt files) I get:
>
> appleEvent "aevt","odoc",""
> button id 1007 of card id 1002 of stack "/Users/rg/Desktop/ae tester/ae
> tester/ae tester copy.app/Contents/MacOS/ae tester",appleEvent,2
>
> appleEvent "aevt","odoc",""
> stack "/Users/rg/Desktop/ae tester/ae tester/ae tester
> copy.app/Contents/MacOS/ae tester",appleEvent,2
>
> But I get no oapp when I launch the app with a document, and I get no
> odoc when I launch the app without one.
>
> I've searched the LC scripts and this issue is different from the older
> one I'd experienced, since the other one was consistent and caused by a
> rev script.
>
> This one appears to be engine-level, in which only the first Apple event
> is processed, and subsequent ones ignored.
>
> Can anyone confirm this before I update my bug report?
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   ____________________________________________________________________
>   Ambassador at FourthWorld.com                http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list