A strange new bug in OF applescript [A: Script Debugger issue, not OF's.]
whpalmer4 has alerted me to the fact that at least one of my scripts, which used to work fine, has started to trip an error message where [I]current date[/I] falls somewhere within [I]tell front document ... end tell[/I]
And the bug is a subtle one - one of the following sequences trips an error, but the other doesn't ... ERROR: [CODE]-- WORKS IF RUN AFTER THE OTHER TWO, -- BUT FAILS IF RUN BEFORE THEM, OR IN A SCRIPT ON ITS OWN tell application "OmniFocus" tell front document current date end tell end tell -- WORKS tell application "OmniFocus" set oDoc to front document tell oDoc current date end tell end tell -- WORKS tell application "OmniFocus" tell default document current date end tell end tell [/CODE] NO ERROR: [CODE]-- WORKS tell application "OmniFocus" set oDoc to front document tell oDoc current date end tell end tell -- WORKS tell application "OmniFocus" tell default document current date end tell end tell -- WORKS IF RUN AFTER THE OTHER TWO, -- BUT FAILS IF RUN BEFORE THEM, OR IN A SCRIPT ON ITS OWN tell application "OmniFocus" tell front document current date end tell end tell[/CODE] |
Or perhaps an OS X change ?
Error: [CODE]-- WORKS IF RUN AFTER THE FOLLOWING CODE, -- BUT FAILS IF RUN BEFORE IT, OR IN A SCRIPT ON ITS OWN tell application "TextEdit" tell front document current date end tell end tell -- WORKS tell application "TextEdit" set oDoc to front document tell oDoc current date end tell end tell[/CODE] Reversed sequence --> no error: [CODE]-- WORKS tell application "TextEdit" set oDoc to front document tell oDoc current date end tell end tell -- WORKS IF RUN AFTER THE PRECEDING CODE, -- BUT FAILS IF RUN BEFORE IT, OR IN A SCRIPT ON ITS OWN tell application "TextEdit" tell front document current date end tell end tell[/CODE] |
Rob, I think I saw your support ticket go by this morning, but I don't remember which ninja ended up getting it. You eventually tracked this down to a problem with Script Debugger, correct?
Just wanted to double-check. |
Yep, Mark has confirmed plans for a fix in SD 5.0 later this year.
|
Thanks - if I was mis-remembering where the issue was, wanted to make sure this had been written up.
|
All times are GMT -8. The time now is 03:55 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.