• 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: Programmatically running a files viewer.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Programmatically running a files viewer. (From: Robert Tillyard <email@hidden>)

  • Prev by Date: Re: Toolbar hide/show button
  • Next by Date: [ANN] BombSquad 1.1
  • Previous by thread: Re: Programmatically running a files viewer.
  • Next by thread: REPOST: Expanded TableView Column layouts
  • Index(es):
    • Date
    • Thread