Open application when file double clicked

Peter Haworth pete at lcsql.com
Tue Feb 24 18:26:31 EST 2015


Just tried opening the application by double clicking it and still no oapp
event.  The more I think about this, the more I"m thinking that there's
something in my startup/preopnCard handlers that is getting in the way of
the apple event.  That would explain why double clicking on a file AFTER
the application is open works fine.

Amazing how often these "I think I'll just add this quick little
convenience feature..." end up screwing you up!

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