• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Coerce to 'alias list'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coerce to 'alias list'


  • Subject: Re: Coerce to 'alias list'
  • From: Walter Ian Kaye <email@hidden>
  • Date: Tue, 20 Jan 2004 17:02:05 -0800

At 08:53a +1100 01/21/2004, Shane Stanley didst inscribe upon an electronic papyrus:

On Jan 21, 2004, at 7:57 AM, Jean-Baptiste wrote:

Why can't I coerce a list of a single item that is a file reference to an 'alias list' ?

What you're seeing is a long-standing bug (and it's not really a coercion). So you need to do something like:

try
set x to every folder of folder theRootFolder as alias list
on error -- only one
set x to every folder of folder theRootFolder as alias
end try

That doesn't work for me on 10.2.8.

When I do

tell app "Finder"
selection as alias list
end tell

I get a list of Finder references instead of a list of aliases, and since there's no error, a try block is useless.

I also couldn't get the old -1700 trick to work.

Thus I must loop through the selection and coerce each item in turn.
(Unless someone has a better idea...?)


-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Coerce to 'alias list'
      • From: Shane Stanley <email@hidden>
    • Re: Coerce to 'alias list'
      • From: Michelle Steiner <email@hidden>
References: 
 >Coerce to 'alias list' (From: Jean-Baptiste <email@hidden>)
 >Re: Coerce to 'alias list' (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: UI Scripting and sub-sub-menus in Photoshop
  • Next by Date: Re: UI Scripting and sub-sub-menus in Photoshop
  • Previous by thread: Re: Coerce to 'alias list'
  • Next by thread: Re: Coerce to 'alias list'
  • Index(es):
    • Date
    • Thread