Test vs. Deploy newbie question
Test vs. Deploy newbie question
- Subject: Test vs. Deploy newbie question
- From: Greg Finnegan <email@hidden>
- Date: Thu, 19 Jul 2012 16:01:26 -0700
I've inherited a whole batch of automation scripts from a very prolific AppleScripter. There's something that he instructed me to do that bugs me about AppleScript and wanted to solicit advice. When deployed in production these scripts run as Stay Open apps.
When he is in code-test-debug mode, he modifies the structure of the script, so while the app/deployed version looks something like this:
-- Deployment version
on run
…
end run
on idle
-- repeat
…
-- end repeat
-- end run
return X
end idle
he alters the structure of the script with comments/uncomments so the version of the script that runs in ScriptDebugger looks something like this (because you can't debug with an idle handler? - so say my notes):
-- Debug/test version
on run
…
-- end run
-- on idle
repeat
…
end repeat
end run
-- return X
-- end idle
Is this fairly routine way to deal with this, or are there other approaches?
Thanks,
Greg.
---------------------------
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden