Re: Folder name from alias
Re: Folder name from alias
- Subject: Re: Folder name from alias
- From: Nigel Garvey <email@hidden>
- Date: Tue, 19 Dec 2000 12:57:06 +0000
"Arthur J Knapp" wrote on Mon, 18 Dec 2000 12:49:31 -0500:
>
> Date: Sat, 16 Dec 2000 17:08:04 -0800
>
> Subject: Re: Folder name from alias
>
> From: Allen Watson <email@hidden>
>
>
> ... 12/7/00 10:59 PM, Michelle Steiner ... observed:
>
>
>> on open {theitem}
>
>
>> braces force only first item to be passed; this assumes that you will be
>
>> dropping only one item at a time on the droplet.
>
>
> I didn't know that! Good bit of info, thanks.
>
>
Wow, I must haved missed this the first time around. That is
>
a good bit of info :)
It's an interesting bit of info. :)
It seems to be a combination of setting variables by list and setting a
shorter list to a longer one, as in:
set {fred} to {1, 2, 3, 4, 5}
All the items are in fact passed, but only the first is taken up. (The
above is the same as setting fred to item 1 of the list, but with the
overhead of a waste list on the left.) In Michelle's example, the
variable name is applied to the first item instead of to the whole list.
This also works:
on open {item1, item2}
- provided that no less than two items are actually dropped!
>
In practice, you would probably want to let the user know that an
>
inappropriate number of items was dropped onto the script,
Almost certainly. The first item is a random process as far as the user
is concerned.
>
but this
>
trick is pretty cool all the same.
Yeah! :-)
NG