Re: List oddity
Re: List oddity
- Subject: Re: List oddity
- From: "Nigel Garvey" <email@hidden>
- Date: Tue, 3 Aug 2010 11:47:06 +0100
"Stockly, Ed" wrote on Mon, 2 Aug 2010 18:59:12 -0500:
>oops, hit send too soon : (
>Here is a little script that creates a test string based on some dates,
>using specific month abbreviations.
>
> I get an empty text string if I use this construct:
>
>set weekString to {item startMonth of mnths, startDay, "â€1", item endMonth
>of
>mnths, endDay} as text
>
>But it works with this construct:
>
>set weekString to {item startMonth of mnths, startDay, "â€1", item
>endMonth of mnths, endDay}
>WeekString as text
>
>Anyone seen this? Is this a bug?
It's been like that for many years. For some reason, when you directly
coerce a list containing a reference in its source code, the items at
and after the reference don't appear in the result. You have to 'get'
the list first to resolve the reference(s).
Similarly:
property mnths : {"Jan.", "Feb.", "March", "April", "May", "June",
"July", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."}
set m1 to item 1 of mnths
{m1} = {item 1 of mnths}
--> false
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden