Re: Arrays in AppleScript ?
Re: Arrays in AppleScript ?
- Subject: Re: Arrays in AppleScript ?
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 28 Dec 2005 18:00:11 -0800
- Thread-topic: Arrays in AppleScript ?
On 12/28/05 4:59 PM, "Jon Pugh" <email@hidden> wrote:
> At 2:39 PM -0800 12/28/05, Paul Berkowitz wrote:
>> Jon means that an application's developers can, and would need to, enable
>> such a coercion - a specific coercion for specific concatenations - for it
>> to happen.
>
> No, I was saying that the Apple Event Manager can coerce any descriptor into a
> list descriptor with the previous descriptor in it. This may need to be done
> explicitly via AppleScript if some applications don't provide a list.
>
> In other words, this should always work:
>
> set oneThing to oneThing as list
>
> Your concern about applications blocking this (via a '****' to 'obj ' coercion
> handler) may mean that you need to do this outside the application's tell
> block, but it should be possible even with application objects.
I was referring to implicit coercion-to-single-item list. As far as I know,
_explicit_ coercion always works. I never thought to question that. I guess
if it ever doesn't, you'd just have to stick the item into list braces.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden