• 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: "John W. Baxter" <email@hidden>
  • Date: Wed, 21 Jan 2004 15:23:23 -0800

On 1/21/2004 2:33, "Emmanuel" <email@hidden> wrote:

> At 9:57 PM +0100 20/01/04, Jean-Baptiste wrote:
>> Why can't I coerce a list of a single item that is a file reference to an
>> 'alias list' ?
>>
>> EG :
>>
>> Folder 1 contains 1 (one) folder
>>
>> set theRootFolder to alias "Jean-Baptiste:Desktop:Folder1:"
>> tell application "Finder" to (get every folder of folder theRootFolder) as
>> alias list --> fails
>
> This really originates in a bug of AppleScript, where it won't let the program
> return a one-item list.

It's entirely possible for a program to return a one-item list...Finder's
developers elected not to.

tell application "BBEdit"
name of every window
end tell

happens here at this moment to return
{"ReadWithBBEdit"}

When I wanted to return a list (back in the prehistoric times during which I
still had time to write code) I would usually build an empty (I just typed
aempty ;-)) AEDescList descriptor (I think it is) then add items to it as I
went along.

(Also, except for a program written in Applescript, Applescript isn't
involved in returning values from programs. Apple Event Manager and friends
do that work in the usual way of writing code.)

--John
_______________________________________________
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: Emmanuel <email@hidden>
References: 
 >Re: Coerce to 'alias list' (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Still more strange things …
  • Next by Date: Re: Inheritance
  • Previous by thread: Re: Coerce to 'alias list'
  • Next by thread: Re: Coerce to 'alias list'
  • Index(es):
    • Date
    • Thread