Re: "Executing" a File
Re: "Executing" a File
- Subject: Re: "Executing" a File
- From: Guy English <email@hidden>
- Date: Thu, 4 Oct 2007 22:53:32 -0400
[[NSWorkspace sharedWorkspace] openFile: pathToFile];
On 4-Oct-07, at 10:48 PM, Chris Williams wrote:
I want to be able to programmatically open or "execute" a random
file. For
example, if I open a .jpg, it would open in Preview. If I open
a .doc, it
would open in Word. And so on. Basically, just execute the default
"open
action" for the file.
(Forgive me for this, but) in Windows code, I can just tell .NET to
"open" a
file, and it will do the default action. NSTask seems to need an
executable. How do I find that executable?
Thanks.
_______________________________________________
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
_______________________________________________
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