Re: Record quirk - or bug?
Re: Record quirk - or bug?
- Subject: Re: Record quirk - or bug?
- From: Nigel Garvey <email@hidden>
- Date: Thu, 31 May 2001 11:01:21 +0100
Paul Berkowitz wrote on Wed, 30 May 2001 19:39:03 -0700:
>
On 5/30/01 7:26 PM, I wrote:
>
>
> count (contents of rec)
>
> -- 0
>
>
>
>
And it's the same with lists, which of course is what i was actually dealing
>
with in my Dialog Director problem.
[...]
>
length of (contents of ls)
>
-- 3
>
>
count (contents of ls)
>
-- 0
>
>
There it is again. 0.
>
>
class of (contents of ls)
>
--list
Firstly, there's a gap in the digests I download this morning, so
apologies if I'm repeating someone else here.
This seems to be one of those occasions where an expression needs to be
resolved before passing it to an OSAX. The following variations all work
for me:
count contents of ls each item
contents of ls
count result
count (get contents of ls)
tell contents of ls to count
As 'ls' isn't a reference, there's actually no point in applying the
dereferencing operator to it.
count ls
'Length of' and 'class of' are both properties rather than commands, and
seem to be resolvable by AppleScript itself when applied to its own
expressions.
NG