• 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: dumb question but vital
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dumb question but vital


  • Subject: Re: dumb question but vital
  • From: Mick <email@hidden>
  • Date: Mon, 09 Jun 2003 18:55:41 -0600

many thanks Andrew and Helmut,

you helped me immensely - I hope to repay the favor sometime

Mick

From: Andrew Oliver <email@hidden>
Date: Mon, 09 Jun 2003 17:16:39 -0700
To: Mick <email@hidden>, email@hidden
Subject: Re: dumb question but vital


There are two things wrong here.

First when you:

> set x to thisfilename

You redefine x as a string object. It is no longer a list.
Instead, you need to:

set x to {thisfilename}

to maintain its list class.

Secondly, when embedding lists, you need to:

set y to y & {x}

Enclosing the sublist in {} adds it as a list rather than as a string
object.

set x to {}
set y to {}
set x to {thisfilename}
set y to y & {x}
class of item 1 of y -- returns "list"

Andrew
:)

On 6/9/03 4:32 PM, "Mick" <email@hidden> wrote:

> why can I not make a list of lists? I have been trying, desperately to get a
> list of file names, make each name into a list and then concatenate those
> lists into a list.
>
> Each time I do it the concatenation seems to put the names back as strings.
>
> for example
>
> set x to {}
> set x to thisfilename (where filename is a string)
> class of x -- returns "list"
>
> but
>
> set x to {}
> set y to {}
> set x to thisfilename
> set y to y & x
> class of item 1 of y -- returns "string"
>
>
> any clues? what am i missing?
>
> Mick
> _______________________________________________
> 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.
_______________________________________________
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.

References: 
 >Re: dumb question but vital (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Not seeing AppleScript dictionary
  • Next by Date: Re: Not seeing AppleScript dictionary
  • Previous by thread: Re: dumb question but vital
  • Next by thread: Re: dumb question but vital
  • Index(es):
    • Date
    • Thread