• 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: distinctUnionOfArrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: distinctUnionOfArrays


  • Subject: Re: distinctUnionOfArrays
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 13 Nov 2015 20:17:39 +1100

On 13 Nov 2015, at 7:09 PM, Takaaki Naganoya <email@hidden> wrote:

Can we use “distinctUnionOfArrays” with NSArray ?
It seems can’t do it...

set bArray to aDict's valueForKeyPath:"players.distinctUnionOfArrays.aLabel"
--> (NSArray) {​​​​​missing value, ​​​​​missing value, ​​​​​missing value​​​}

I can never remember these operators. You have two problems there. First, distinctUnionOfArrays works with arrays of arrays, whereas you have just an array of objects. So you need distinctUnionOfObjects. Second, the operators need to be preceded by"@". So:

set bArray to aDict's valueForKeyPath:"email@hiddenl"
--> (NSArray) {​​​​​1,2​​​}


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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: distinctUnionOfArrays
      • From: Takaaki Naganoya <email@hidden>
References: 
 >distinctUnionOfArrays (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: distinctUnionOfArrays
  • Next by Date: ip forwarding
  • Previous by thread: distinctUnionOfArrays
  • Next by thread: Re: distinctUnionOfArrays
  • Index(es):
    • Date
    • Thread