Re: dumb question but vital
Re: dumb question but vital
- Subject: Re: dumb question but vital
- From: Andrew Oliver <email@hidden>
- Date: Mon, 09 Jun 2003 17:16:39 -0700
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.