I have just gotten around to checking my launch command test scripts in Mavericks. Recall that the launch command should NOT send the 'run' command to the launched application. The bug in Mt. Lion and Mavericks is that it does incorrectly sends the 'run' command.
Here are my test scripts, followed by the results in Lion, Mt. Lion and Mavericks.
-- compile as an application bundle named "CallingApp.app" on run tell application "Finder" (container of (path to me)) as alias set hostAppl to (the result as text) & "main.app" end tell
try launch application hostAppl tell application hostAppl doSomethingElse() -- comment out and see what happens end tell on error errText number errNr activate me "CallingApp Error = " & errNr & return & errText tell me to display dialog the result buttons {"OK"} default button 1 end try end run -----------------------------
and
-- compile as an application bundle named "main.app" on run activate me tell me to display dialog "Running" buttons {"OK"} default button 1 end run
on doSomethingElse() activate me tell me to display dialog "What do you want to do?" buttons {"OK"} default button 1 end doSomethingElse
Put both applications in the same folder. Double-click "CallingApp" to start the test. And my results are …
Lion ----------------------------- Only the "What do you want to do?" dialog appears. This is the correct behavior.
Mt. Lion -------------------------- The "Running" dialog appears. (incorrect, 'launch' has sent the 'run' command.) Click "OK" to get ... the "Error -609" dialog.
Mavericks ------------------------ The "Running" dialog appears (again, 'launch' has sent the 'run' command.) behind the "What do you want to do?" dialog. There is no "Error -609" dialog.
The behavior of the 'launch' command has changed in Mavericks, but the bug ('launch' sends the 'run' command) is still there.
|