Re: telling icon view options
Re: telling icon view options
- Subject: Re: telling icon view options
- From: Christopher Nebel <email@hidden>
- Date: Mon, 11 Oct 2004 21:17:59 -0700
That's not exactly the problem. For most properties, Gnarlie's two
original scripts would be synonymous, but in this case "icon view
options" is both a property name *and* a class name -- without the
"its", AppleScript is forced to guess which one you mean, and
unfortunately prefers to interpret it as a class, which is usually not
what you want. There's a bug filed on this.
--Chris Nebel
AppleScript Engineering
On Oct 11, 2004, at 6:05 PM, Gnarlodious wrote:
Sheesh! All that agony over a missing "its"!
I didn't realize the View Options window was "owned" by the front
window.
It's window slavery is what it is...
-- Gnarlie
Entity kai spoke thus:
On Sat, 09 Oct 2004 10:08:16 -0600, Gnarlodious wrote:
So, why is it I can say:
tell application "Finder"
tell icon view options of front window
set icon size to 128
set arrangement to arranged by name
end tell
end tell
but I can't say (won't compile):
tell application "Finder"
tell front window
tell icon view options
set icon size to 128
set arrangement to arranged by name
end tell
end tell
end tell
Try this slight modification, Gnarlie:
-------------------------
tell application "Finder"
tell front window
tell its icon view options
set icon size to 128
set arrangement to arranged by name
end tell
end tell
end tell
-------------------------
Seems this form of syntax is required to get at Finder windows
properties with multiple values, such as 'icon view options'
(<arrangement>/<icon size>) and 'list view options' (<calculates
folder
sizes>/<icon size>/<sort column>/<uses relative dates>).
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
@earthli
nk.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden