Re: Tell Blocks Considered Harmful (was Re: open for access)
Re: Tell Blocks Considered Harmful (was Re: open for access)
- Subject: Re: Tell Blocks Considered Harmful (was Re: open for access)
- From: Rick Gordon <email@hidden>
- Date: Fri, 19 Dec 2008 18:02:21 -0800
Yes. But ina real-word (for me) example, where I'm probably nested waist-deep into the object hierarchy of InDesign, #1 is a lot less hassle and more readable, than having to close six or so tell blocks and then reenter the hierarchy just as deep. In other words, I'd do #1, but I wouldn't do #2, unless things are breaking on my watch.
Rick Gordon
------------------
On 12/19/08 at 5:47 PM -0800, Chris Page wrote in a message entitled
"Re: Tell Blocks Considered Harmful (was Re: open for access":
>On Dec 19, 2008, at 4:09 AM, Rick Gordon wrote:
>
>>So, Chris, then please confirm that the code in sample 1 below (with multiple commands sent to "me," but nested inside an application call) -- as the skeleton of something much more complex -- would avoid your potential issues as well as the version in sample 2. Thanks.
>
>Yes, the nested 'tell me to' block in #1 avoids sending the commands to Finder. Moving the commands outside the Finder tell block altogether, as in #2, is even better, because it eliminates dependencies on Finder's terminology altogether, and makes it clear to anyone reading the code that you don't intend it to use Finder's terminology for those lines.
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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