on appleEvent on LC 6 vs LC 7
Posted: Thu Sep 17, 2015 8:54 pm
On a Mac Standalone I use this script to learn about what interaction was made by the user when the standalone opens:
Then in openStack if I find "YES" in createNewWindow, I create the new window (I clone a stack).
All worked fine in LiveCode 6, but compiling with LC 7 I get that the openStack message happens before the appleEvent so I find the variable createNewWindow empty.
Is something changed between 6 and 7 about appleEvent handling? Or maybe it's just that my code is not so reliable how I hoping?
PS
How to create an application that opens when you drag a file onto it
http://lessons.runrev.com/m/4071/l/1592 ... le-onto-it
Code: Select all
on appleEvent pClass, pID
if pClass is "aevt" then
if pID is "odoc" then // file opened on the Finder
request appleEvent data
put it into tFilePath
openDocument tFilePath
else if pID is "pdoc" then // file printed on Finder
request appleEvent data
put it into tFilePath
printDocument tFilePath
else if pID is "oapp" then // app opened on the Finder
put "YES" into createNewWindow
else
pass appleEvent
end if
else
pass appleEvent
end if
end appleEvent
All worked fine in LiveCode 6, but compiling with LC 7 I get that the openStack message happens before the appleEvent so I find the variable createNewWindow empty.
Is something changed between 6 and 7 about appleEvent handling? Or maybe it's just that my code is not so reliable how I hoping?

PS
How to create an application that opens when you drag a file onto it
http://lessons.runrev.com/m/4071/l/1592 ... le-onto-it