• 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: Reading nested lists from a preference file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading nested lists from a preference file


  • Subject: Re: Reading nested lists from a preference file
  • From: Greg Strange <email@hidden>
  • Date: Tue, 24 Apr 2001 00:23:29 -0500

on 4/24/01 12:00 AM, Yosuke Ichikawa at email@hidden wrote:

> I'm working with a nested list. To give a simplified
> example, I want the script to work like so;

<snip>

This is a classic problem in scripting. I have this challenge all the time.
In some of the more "ubiquitous" scripting languages, one uses not the list
itself but a reference to a list. So you have a list of the list names.
Like so,


set firstList to {1, 2, 3}
--(*1,2,3*)

set secondList to {4, 5, 6}
--(*4,5,6*)

set thirdList to {firstList, secondList, 7, 8, 9}
--(*1, 2, 3, 4, 5, 6, 7, 8, 9*)

set extractedItem to item 1 of item 2 of thirdList
--(*4*)

Hope that helps.

Greg Strange


References: 
 >Reading nested lists from a preference file (From: Yosuke Ichikawa <email@hidden>)

  • Prev by Date: Re: Event GURLMAIL
  • Next by Date: Re: Reading nested lists from a preference file
  • Previous by thread: Reading nested lists from a preference file
  • Next by thread: Re: Reading nested lists from a preference file
  • Index(es):
    • Date
    • Thread