Thanks for the suggestion. Have not encountered Scripting Bridge before and 
have very little experience or understanding of AppleScript and no knowledge of 
Apple Events or what they do. I had a vague notion that Apple Events were 
pretty much old technology from before OSX, but now I see that it appears that 
it's the foundation of AppleScript. I guess I should take time to look into 
these technologies sometime (I come from a NextStep/OpenStep/WebObjects 
background)...

Is there any particular reason you say to stay away from NSTask?

Scripting Bridge seems like an interesting option, but after having generated 
the headers for Finder, I could not see a command there for compressing files. 
I guess it's not scriptable.

Jens has confirmed that there is no limit to the length of the args for NSTask, 
so am planning to go with my option 1 - it's a technology I understand, and 
should apparently do what I need to do, and do it efficiently.

On 15/02/2010, at 4:06 PM, Sean McBride wrote:

> Gideon King (gid...@novamind.com) on 2010-02-15 00:28 said:
> 
>> Hi, I have a need to zip a selection of files from a folder.
>> 
>> ...
>> 
>> Are there any other options that I'm not aware of?
> 
> NSWorkspaceCompressOperation?  Sounds promising, right?  But the docs
> say "This operation always returns an error"?  HA! :)
> 
> Did you investigate Scripting Bridge, AppleScript, or Apple Events?  The
> Finder has a Compress option in its File menu, maybe you can tell Finder
> to zip for you.  Stay away from NSTask when you can.
> 
> Sean
> 
> --
> "Patriotism is supporting your country all the time, and your government
> when it deserves it." - Mark Twain
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to