PDA

View Full Version : Delete code?




themacster298
May 6, 2012, 07:35 PM
Hello, so recently I saw an applescript that move files to the trash that you link it to.(/Users/name/Downloads is an example)

How would I do this in a mac application?



chown33
May 6, 2012, 08:15 PM
A Mac application written in which programming language?


If you mean in Objective-C, using the Cocoa framework, see this:
http://www.cocoabuilder.com/archive/cocoa/2991-trash-access-via-objective-cocoa.html

Found by googling objective-c move to trash

Also see:
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html

Found by reading the cocoabuilder page and looking up the NSWorkspace class reference.