• 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
Addressing List Items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Addressing List Items


  • Subject: Addressing List Items
  • From: Marconi <email@hidden>
  • Date: Wed, 04 May 2011 08:09:24 -0700

I've never used lists before. I've googled and cannot find an answer to my very basic question.

How does one populate an empty list? What is the proper way to address list items?

set EditArray to {}
set aValue to 0 -- for this example

repeat with LineNumber from 1 to 5
	--here I would calculate the value of EditStart
	set EditStart to aValue

	-- here I would calculate the value of EditEnd
	set EditEnd to aValue
	set item LineNumber of EditArray to {EditStart, EditEnd}

	set LineNumber to LineNumber + 1
end repeat

	Can't set Item 1 of {} to {0, 0}.


Apparently, "Item x of EditArray" is not the proper way to refer to the first record of EditArray. Neither is "record x of EditArray"


What's the proper way to address records of a list?




_______________________________________________ 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: Addressing List Items
      • From: Marconi <email@hidden>
    • Re: Addressing List Items
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: beep no more
  • Next by Date: Re: Addressing List Items
  • Previous by thread: beep no more
  • Next by thread: Re: Addressing List Items
  • Index(es):
    • Date
    • Thread