Re: What is Best Method To Determine Duplicate Items in a Large List?
Re: What is Best Method To Determine Duplicate Items in a Large List?
- Subject: Re: What is Best Method To Determine Duplicate Items in a Large List?
- From: Shane Stanley <email@hidden>
- Date: Tue, 15 Aug 2017 15:45:32 +1000
On 15 Aug 2017, at 12:43 pm, Jim Underwood <email@hidden> wrote:
>
> The simplest way would be to change the order so it's first or last -- then
> your sort key would firstItem or lastItem.
>
> OK, I like that idea, but I don't see how to implement it. The current sort
> is just on the dup items without the indexes:
> set duplicatedValues to countedDupes's allObjects()'s
> sortedArrayUsingSelector:"compare:"
>
> What do I need to change for this option?
You need to change the order of the items, convert indexInfo to an array or
mutable array, then sort it using a sort descriptor with the key "firstObject"
or "lastObject", depending how you arranged it.
> This seems to work. Can you please confirm:
Yep, that works.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
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