Re: "a reference to"
Re: "a reference to"
- Subject: Re: "a reference to"
- From: deivy petrescu <email@hidden>
- Date: Tue, 15 Jan 2008 16:01:28 -0500
On Jan 15, 2008, at 15:35, Luther Fuller wrote:
So, the code ...
bounds of window of desktop
set scrWd to (item 3 of the result)
is an implicit 'get' or 'dereference'. Right?
On Jan 15, 2008, at 1:23 PM, Mark J. Reed wrote:
On Jan 15, 2008 1:56 PM, Luther Fuller <email@hidden>
wrote:
Why did I have to use 'get' ?
Because all "bounds of window of desktop" gets you is a reference to
the bounds property. A reference is not a list, and has no items.
When you use "get", it "derefrences" the reference, giving you the
value of the property instead. That is a list, from which you can
then extract items.
It's the difference between a bill of goods (in the non-pejorative
sense) and the actual box containing the merchandise.
--
Mark J. Reed <email@hidden>
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.
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