• 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: can I make a list of records?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can I make a list of records?


  • Subject: Re: can I make a list of records?
  • From: Nigel Garvey <email@hidden>
  • Date: Tue, 29 Jan 2002 16:25:35 +0000

Michelle Steiner wrote on Mon, 28 Jan 2002 23:56:37 -0700:

>Curiouser and curiouser.

Hi, Michelle. I get the same results as you with all your test scripts,
with both AS 1.3.7. and AS 1.6.

>set MyList to {}
>set myFirstRecord to {a:1, b:2}
>set mySecondRecord to {a:3, b:4}
>set the end of MyList to myFirstRecord
>set the end of MyList to mySecondRecord
>
>--> {a:3, b:4}

This isn't MyList, but the result of setting the end of it to
mySecondRecord.

>set MyList to {}
>set myFirstRecord to {a:1, b:2}
>set mySecondRecord to {a:3, b:4}
>set MyList to MyList & myFirstRecord & mySecondRecord
>
>--> {a:1, b:2}

This is really odd. Could it be that MyList is starting life as an empty
record rather than an empty list?

>set MyList to {}
>set myFirstRecord to {a:1, b:2}
>set mySecondRecord to {a:3, b:4}
>set the end of MyList to {myFirstRecord}
>set the end of MyList to {mySecondRecord}
>
>--> {{a:3, b:4}}

Again, the result of setting the *end* of MyList.

>set MyList to {}
>set myFirstRecord to {a:1, b:2}
>set mySecondRecord to {a:3, b:4}
>set MyList to MyList & {myFirstRecord} & {mySecondRecord}
>
>--> {{a:1, b:2}, {a:3, b:4}}

What you'd expect from a concatentation of three lists - but not if
MyList is actually an empty record. Maybe {} is interpreted as a list or
a record according to the circumstances.

?

NG


  • Follow-Ups:
    • Re: can I make a list of records?
      • From: "Serge Belleudy-d'Espinose" <email@hidden>
    • Re: can I make a list of records?
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: storing last date ran as a property
  • Next by Date: Re: ITunes -- any way to make it scriptable?
  • Previous by thread: Re: can I make a list of records?
  • Next by thread: Re: can I make a list of records?
  • Index(es):
    • Date
    • Thread