• 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: ASObjC: Get Most Recent File or Folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: ASObjC: Get Most Recent File or Folder
      • From: Dave <email@hidden>
References: 
 >ASObjC: Get Most Recent File or Folder (From: Christopher Stone <email@hidden>)
 >Re: ASObjC: Get Most Recent File or Folder (From: Jim Underwood <email@hidden>)
 >Re: ASObjC: Get Most Recent File or Folder (From: Christopher Stone <email@hidden>)
 >Re: ASObjC: Get Most Recent File or Folder (From: Dave <email@hidden>)

  • Prev by Date: Re: [FYI] more sdef-based library stupidity
  • Next by Date: About the use statement
  • Previous by thread: Re: ASObjC: Get Most Recent File or Folder
  • Next by thread: Re: ASObjC: Get Most Recent File or Folder
  • Index(es):
    • Date
    • Thread