1
votes

I am using Lua Glider for Corona SDK , When I am running my Application I got the erroe like "Apple Event Timed Out" And I am using Mac. I am getting the following Error in Plugin Console

System Lua Interpreter plugin loaded successfully
Corona plugin loaded successfully
Moai plugin loaded successfully
Marmalade plugin loaded successfully
Love 2d plugin loaded successfully
Gideros plugin loaded successfully
56:74: execution error: Corona Simulator got an error: AppleEvent timed out. (-1712)

Can any one Help me

1
Is your Lua Glider latest 1.9, if not first update it. - Rais Iqbal

1 Answers

1
votes

This is an apple event error, which means that you are not allowed to execute more code because you are very slow.

For example, you are targeting the Finder to duplicate a folder, which has a size of 888 terabytes. After it is duplicated, you wish rename the new folder to "duplicate gotta hey!". This is the code:

Open this Scriplet in your Editor:

tell application "Finder"
  duplicate alias "path:to:really BIG folder:"
  set name of result to "duplicate gotta hey!"
end tell

The Finder will receive the order: "duplicate!" And AppleScript will wait for a response: "done, sir!".

If AppleScript gets tired of waiting for an answer, it will time out and will die throwing the error "AppleEvent timed out". So, the "set name..." line won't be executed.

Actually, AS 1.9.1, AppleScript gets tired after 2 minutes. However, you can prevent this from happening using the following statement:

Open this Scriplet in your Editor:

with timeout of (30 * 60) seconds
  tell application "Finder"
    duplicate alias "path:to:really BIG folder:"
    set name of result to "duplicate gotta hey!"
  end tell
end timeout

Now, AppleScript will get tired after 30 minutes!

Note that this error will happen only when you are targeting a process (eg, the Finder). However, if you use the following code...

Open this Scriplet in your Editor:

set aFolder to (choose folder with prompt "Choose a folder, please...")

... If you were an irresolute folk, you could wait for 17 days before choosing a folder, and you wouldn't receive a timeout error.