• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: List oddity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: List oddity
      • From: Paul Berkowitz <email@hidden>
    • Re: List oddity
      • From: Stan Cleveland <email@hidden>
  • Prev by Date: Re: List oddity
  • Next by Date: Re: List oddity
  • Previous by thread: Re: List oddity
  • Next by thread: Re: List oddity
  • Index(es):
    • Date
    • Thread