Re: Coercing an array of aliases to files
Re: Coercing an array of aliases to files
- Subject: Re: Coercing an array of aliases to files
- From: Alex Zavatone <email@hidden>
- Date: Tue, 09 Feb 2010 23:27:18 -0600
On Feb 9, 2010, at 10:35 PM, Deivy Petrescu wrote:
Thanks Deivy. All I wanted to do was to see if there was a one line way of coercing an array (list) of aliases to an array of files. I thought that was explanatory enough.
It turns out that you can't do that.
In the end, this is what I ended up doing:
set myItems to {}
repeat with myItem in someItems
set myNewItem to myItem as text
set the end of myItems to myNewItem
end repeat
Alex, The list above is a list of strings. When you say you want to coerce an array (list) of aliases to an array of files then either you can't, because an (Finder) alias is not technically a file, or, you do not need to because an alias could a file (or a folder, or a disk). In my example above all the aliases are files. Deivy Petrescu email@hidden
I ended up finding that the text strings were easier to work with and the aliases were only able to be coerced to be certain types. I was expecting to get a file property and surprisingly, the alias was not able to do that (no idea why), so text it was.
It's solved, thanks.
|
_______________________________________________
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