Re: Finder Question
Re: Finder Question
- Subject: Re: Finder Question
- From: "S. J. Cunningham" <email@hidden>
- Date: Wed, 11 Jan 2017 16:58:25 -0500
On Jan 11, 2017, at 4:39 PM, Christopher Stone wrote:
> On Jan 11, 2017, at 14:01, S. J. Cunningham <email@hidden> wrote:
>> Why does the first method work and the second fail?
>
> Hey Steve,
>
> Because? :)
>
>> They seem equivalent to me.
>
> Not really.
>
> (Although I thought the same thing long ago.)
>
>> -- Method 1
>> tell application "Finder" to set urlList to URL of every item of someFolder
>
> Talking to the folder and creating a list of Finder-References.
>
> Quite appropriately.
>
> Although Finder-References are generally useless and slow – it's faster and better to get as alias list.
>
> tell application "Finder"
> tell front window
> set l to items as alias list
> end tell
> end tell
>
>> -- Method 2
>> tell application "Finder" to set fileList to every item of someFolder
>
> Talking to the folder and creating a list of Finder-References.
>
>> tell application "Finder" to set urlList to URL of every item of fileList
>
> THEN – talking to the list-object of Finder-References – NOT the Finder-Folder-Object.
>
> You're not actually talking to the Finder anymore, although the Finder-Tell-Block is fooling you into thinking that you are.
>
> Make more sense?
Thanks. Seems kind of subtle. I'll have to think about it.
A related question: Lets say have a list of items, itemList, that all have a property, call it property_x.
Sometimes
set propertyList to property_x of every item of itemList
gives me a list of properties and sometimes it doesn't. I can't make rhyme or reason out of when it works and when it doesn't.
Any guidance?
Steve Cunningham
410 Clayton Road, Chapel Hill
(near Estes Hills School)
919-338-2630
_______________________________________________
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