Open application when file double clicked
Bob Sneidar
bobsneidar at iotecdigital.com
Tue Feb 24 20:11:16 EST 2015
Okay, 1 beer really can’t stop me from looking stuff up. Please see: http://superuser.com/questions/20822/where-does-mac-os-x-store-file-association-information
Looks like you need a terminal command to do this. When in doubt, SHELL IT! Your mileage may vary.
Bob S
On Feb 24, 2015, at 15:58 , Peter Haworth <pete at lcsql.com<mailto:pete at lcsql.com>> wrote:
Yeah, I got that stack and it works for me too. I actually removed the
file association since that's how my app is built but it still worked. As
mentioned previously, I'm thinking that perhaps the problem is in the code
in my startup/preOpenCard handlers somehow stepping on the appleEvent
message. Since double clicking a file works OK for me when the app is
already open, that hangs together.
On Tue Feb 24 2015 at 3:27:51 PM Richard Gaskin <ambassador at fourthworld.com<mailto:ambassador at fourthworld.com>>
wrote:
Even weirder:
Offlist Bernd kindly sent an example of a stack similar to what's
described below, but it works flawlessly.
The only significant difference I could find was that his uses a custom
document type, while I had use txt.
So I went back to my test app, changed the document type from txt to a
custom one, and now I get the odoc events both when files are dropped on
the app to launch it and while the app is already running.
This seems like a bug in the Finder more than LiveCode, some oddity in
how AE works with well known file types.
Since there doesn't appear to be any problem at all, I'm closing my bug
report.
And since there doesn't appear to be any problem at all, how did we wind
up here?
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com<mailto:Ambassador at FourthWorld.com> http://www.FourthWorld.com
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://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
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com<mailto: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