Re: List with single values
Re: List with single values
- Subject: Re: List with single values
- From: Helmut Fuchs <email@hidden>
- Date: Tue, 24 Jul 2001 18:43:21 +0200
John Haley <email@hidden> wrote:
I am having a problem where a variable in a loop is usually a list but can be
a single item. It crashes the script every time it hits a single value.
What is the work around for this??
Every time you are expecting a list, convert the result to a list. If
the result already is a list nothing happens, else it is converted to
a "Single-Item list". Therefore:
set foldersList to (name of every folder of (aliasloopPathName)) as list
should do the job for you.
--
Helmut
** still missing Newton Inc., Newt itself and NewtonScript very much **