Hello,
Before I spend time on this has anyone created a script to "Answer theError" during iOS simulator debugging?
I'm looking for a similar function as the IDE has.
My scripts run great on Mac/PC but then bomb in the simulator. Any code out there?
TIA
Simon
Error detection for iOS simulator?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Error detection for iOS simulator?
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Error detection for iOS simulator?
Try adding the following code to the main stack to see if it catches the error before the app bombs...
on errorDialog pExecutionError, pParseError
if item 2 of line 1 of pExecutionError is 0 then
answer "An error occurred " & cr & cr & pExecutionError
else
answer "An error occurred on line: " & item 2 of line 1 of pExecutionError
end if
end errorDialog
This has worked for me as the error is quite often caused by trying to access an object that doesn't exist, and this will catch it and let you know which line of your code the issue is on.
Andy
on errorDialog pExecutionError, pParseError
if item 2 of line 1 of pExecutionError is 0 then
answer "An error occurred " & cr & cr & pExecutionError
else
answer "An error occurred on line: " & item 2 of line 1 of pExecutionError
end if
end errorDialog
This has worked for me as the error is quite often caused by trying to access an object that doesn't exist, and this will catch it and let you know which line of your code the issue is on.
Andy
Re: Error detection for iOS simulator?
SWEET!
Thanks Andy that does it.
Simon
Thanks Andy that does it.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!