Re: "a reference to"
Re: "a reference to"
- Subject: Re: "a reference to"
- From: deivy petrescu <email@hidden>
- Date: Tue, 15 Jan 2008 17:17:45 -0500
On Jan 15, 2008, at 16:41, Luther Fuller wrote:
On Jan 15, 2008, at 3:01 PM, deivy petrescu wrote:
Luther, I have to agree this is not exactly clear.
The deferencing happens in a "kind of confusing" way.
Check this:
tell application "Finder"
set wb to ((bounds of window of desktop))
set cl to class of ((bounds of window of desktop))
set cw to class of wb
{cl, cw}
end tell
-->{property, list}
And this:
tell application "Finder" to return (bounds of window of desktop))
--> a list
The only thing I have to say for that is that I put "get" on
anything now.
I agree. And will change my bad habits.
But, where did I get the bad habit of not using 'get'?
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.) In other words ...
get something
is always equivalent to ...
something
But ...
somethingelse of (something)
and
somethingelse of (get something)
aren't equivalent and the latter is correct.
First thing I have to say is that I thought that the "one more thing"
today was going to be about the current release of the "AppleScript
Language Guide". That would have caused a major uproar in the
audience, I am sure!
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. Or I've used it sparingly. I
do not recall "somethingelse of (get something)" before X, but can
assure you that in X it became "get somethingelse of (get something)".
:)
Deivy
_______________________________________________
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