Re: Record quirk - or bug?
Re: Record quirk - or bug?
- Subject: Re: Record quirk - or bug?
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 31 May 2001 08:58:40 -0700
On 5/31/01 3:01 AM, "Nigel Garvey" <email@hidden> wrote:
>
As 'ls' isn't a reference, there's actually no point in applying the
>
dereferencing operator to it.
As I explained somewhere in my first post, I wasn't actually gratuitously
using 'contents of ls' to dereference an unreferenced record or list. In the
real-life situation i was trying to debug, AppleScript was getting confused
(understandably) because 'contents' just happens to be the label
(unalterable, because it's part of Dialog director's setup) of one of the
items _within_ the record. That's the item I was actually trying to count
(it's a list, called 'contents' of more records). The consequences of an
incorrect count of 0 of that inner list were quite dramatic and confusing.
Eventually I worked out what was going on.
But it's still odd. Presumably, as Serge discovered, there's some coercion
not being done right. There's this one instance where 'contents' of an
unreferenced list or record is not evaluated to itself when the event
'count' is applied to it, and instead of erroring (or evaluating) coerces
'nothing countable' to 0.
--
Paul Berkowitz