Re: ASObjC: Get Most Recent File or Folder
Re: ASObjC: Get Most Recent File or Folder
- Subject: Re: ASObjC: Get Most Recent File or Folder
- From: Shane Stanley <email@hidden>
- Date: Sat, 04 Jun 2016 12:38:04 +1000
On 4 Jun 2016, at 1:23 AM, Dave <email@hidden> wrote:
>
> In my opinion it would be better to add another handler that calls the array version and extracts the last Object from the returned array:
That's what you'd typically do in Objective-C, but there's an extra wrinkle here performance-wise, because the result needs to be converted back to an AS object. So if you have a folder with a lot of files, converting that array to a list of AS strings and then extracting the last item is going to be slower than converting just the last object in the array.
In fact, with long lists converting back and forth often takes a lot longer than whatever you made an array for in the first place.
--
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