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: Chris Page <email@hidden>
- Date: Tue, 16 Dec 2008 15:44:06 -0800
On Dec 16, 2008, at 13:00 PM, Shane Stanley wrote:
On 17/12/08 7:18 AM, "Paul Berkowitz" <email@hidden> wrote:
an internal 'tell application "FBA"' might actually be easier than
scripters pulling them out of application tell blocks
You must have missed the bit earlier where "internal" tell blocks
are also under fire.
Not exactly. I think it's best to avoid using unnecessary tell blocks.
If you're using a tell block it's best to avoid unnecessarily placing
commands within them. If you're placing commands inside a tell block
that don't need to go to the tell target, it's best to make your
script clear about which commands it intends to send to the tell
target and which it doesn't.
There are several mechanisms available to perform the latter, for
example:
tell application "Finder"
tell me to current date
set theDate to my (current date)
get every item whose modification date < (current date) of me
end tell
‘tell me to’ is an option if the command is on a line by itself.
‘my’/‘of me’ can be used for commands within a statement or expression
that contains commands that should go to the tell target.
--
Chris Page - Matrix Glitch
“Mr. Anderson, do you hear that sound? That is the sound of
immutability.” — Agent const
_______________________________________________
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