Re: Programmatically running a files viewer.
Re: Programmatically running a files viewer.
- Subject: Re: Programmatically running a files viewer.
- From: Jan Van Tol <email@hidden>
- Date: Wed, 12 Mar 2003 23:27:36 -0600
This ought to work:
[[NSWorkspace sharedWorkspace] openFile: pathToFile];
-Jan Van Tol
On Wednesday, March 12, 2003, at 08:40 PM, Robert Tillyard wrote:
I have an application that is sent files from a remote UNIX server.
The files may be Word Documents, QuickTime Movies or any other image.
When I receive the files I would like to display them using the
correct application, wait until that application quits and then delete
the files.
I think NSTask looks like the class for managing most of this.
Would anyone know how I find the correct program to run to view
whatever file I need viewed?
One slight complication, because these are transferred from a UNIX
system they won't have resource forks but double clicking them does
seem to work so there is obviously some kind of default viewer for
each file type.
Thanks, Regards, Rob.
---
Bury St. Edmunds, Suffolk, UK.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.