OSX Opening an App with a document

Paul Dupuis paul at researchware.com
Wed Oct 5 17:56:14 EDT 2016


Okay list gurus:

What is the best practice method for determine whether a Standalone app
under OSX was opened with a document (by drag and drop or double-click)?

I have an appleevent handler that get any doc dropped on the app while
it is running. I was also checking this after startup (and by startup I
mean the initial message set of startup, preopenstack, openstack, etc,
etc. opencard). I needed to change the startup sequence a bit and now
the code I was using is essentially on opencard. Hwoever, checking the
pendingMessages shows the standalone has not yet received the appleevent
message yet.

This is SOO much simpler under Windows where the global $1 has any file
that was launched at startup - AT startup!

Does anyone have any good on-startup code to determine if an OSX app was
launched with a doc?




More information about the use-livecode mailing list