• 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: recycleURLs doesn't enable Put Back or Undo in Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recycleURLs doesn't enable Put Back or Undo in Finder


  • Subject: Re: recycleURLs doesn't enable Put Back or Undo in Finder
  • From: Steve Mills <email@hidden>
  • Date: Mon, 19 Jan 2015 12:15:18 -0600

> On Jan 19, 2015, at 10:34:37, Jerry Krinock <email@hidden> wrote:
>
>
>
> True, the documentation says that -[NSWorkspace recycleURLs:completionHandler]  acts "in the same manner as the Finder”, but they didn’t say “exactly”.
>
> The way to get it to work exactly like Finder is to AppleScript the Finder.  This also gives you an additional “bonus” - the trash-can sound effect :)
>
> See code in my method -[NSFileManager(SomeMore)trashPath:scriptFinder:error_p:] which is in here:

I was thinking of doing it with AppleScript. Thanks. Perhaps Apple expects the application calling recycleURLs will keep track of the returned urls and put them on its own undo stack. That seems kinda goofy.

And in case anyone else runs across this thread and runs into "Application isn't running" errors, I needed to add AppleScript entitlements to my sandboxed app in order for this to work.

--
Steve Mills
Drummer, Mac geek


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: recycleURLs doesn't enable Put Back or Undo in Finder
      • From: Steve Mills <email@hidden>
References: 
 >recycleURLs doesn't enable Put Back or Undo in Finder (From: Steve Mills <email@hidden>)
 >Re: recycleURLs doesn't enable Put Back or Undo in Finder (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Testing selection with NSArrayController?
  • Next by Date: Re: recycleURLs doesn't enable Put Back or Undo in Finder
  • Previous by thread: Re: recycleURLs doesn't enable Put Back or Undo in Finder
  • Next by thread: Re: recycleURLs doesn't enable Put Back or Undo in Finder
  • Index(es):
    • Date
    • Thread