• 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 is in another list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List is in another list


  • Subject: Re: List is in another list
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 11 Sep 2010 09:10:01 +1000
  • Thread-topic: List is in another list

On 11/9/10 8:05 AM, "Alex Zavatone" <email@hidden> wrote:

> Any thoughts?

When you run:

set myList to {{22.0, "0xFFB0B0B0"}, 0}
set myVal to {22.0, "0xFFB0B0B0"}
myList contains myVal

You're actually asking AS if myval is a sublist of myList -- whether it
contains both of myVal's values. Try this:

set myList to {{22.0, "0xFFB0B0B0"}, 0}
set myVal to {{22.0, "0xFFB0B0B0"}}
myList contains myVal

set myList to {22.0, "0xFFB0B0B0", 0}
set myVal to {22.0, "0xFFB0B0B0"}
myList contains myVal

Not exactly intuitive, but useful because of the ability to check a sublist
quickly.

--
Shane Stanley <email@hidden>



 _______________________________________________
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 is in another list
      • From: Alex Zavatone <email@hidden>
References: 
 >List is in another list (From: Alex Zavatone <email@hidden>)

  • Prev by Date: List is in another list
  • Next by Date: Re: List is in another list
  • Previous by thread: List is in another list
  • Next by thread: Re: List is in another list
  • Index(es):
    • Date
    • Thread