Re: "a reference to"
Re: "a reference to"
- Subject: Re: "a reference to"
- From: "Stockly, Ed" <email@hidden>
- Date: Wed, 16 Jan 2008 10:57:21 -0800
- Thread-topic: "a reference to"
>> I just went to my hardcopy AppleScript Language Guide [Addison-Wesley, 1993],
which I seldom look at these days. It defines 'get' and indicates that it is
optional, always. (At least, it was in 1993.)
"Get" is so "optional" than I don't think I've used it in a script for
years. That part of the ASLG is correct. What it doesn't indicate is that in
some cases you cannot issue multiple commands within a single line of
appleScript without it, but, since multiple commands within a single line is
optional, the "get" is also optional.
> I assume that "get" came together with cocoa or OS X. I am sure that in 9.xx
and earlier I have not used get.
I believe that this is a minor imperfection that has been with the language
from the start.
I've tested the variations of the script below in Tiger and OS 9.x and the
behavior is identical.
tell application "Finder"
set scrWd to bounds of (window of desktop)
--generates error in 9.x and 10.x
properties of window of desktop
set scrWd to (item 3 of the result)
--works error in 9.x and 10.x
set scrWd to (item 3 of (get bounds of window of desktop))
--works error in 9.x and 10.x
end tell
>>>Or I've used it sparingly.
That would be my guess. Perhaps, as we've become more comfortable with
appleScript we've been combining more commands on the same line because that
looks cooler, or makes it easier to follow the script. (There's no
performance advantage.)
That said, I wouldn't even call this a "bug".
I'd call it a minor imperfection in the language, certainly not worth
tossing any babies out with the bathwater, may not be worth giving the baby
a bath to clean this one up.
In general I'd say that any time 9 out of 10 messages complaining about a
feature are along the lines of
" someScript doesn't work, but someslightlymodifiedversionofsomescript does
work "
Then I wonder if we really want AppleScript engineers devoting their
precious time solving minor problems that AppleScripters have easily solved.
Plus, this isn't even a "newbie" problem in the traditional sense of the
word "newbie". It's more often scripters experienced in other languages
trying AppleScript who are finding this to be an issue.
FWIW,
ES
_______________________________________________
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