Re: Opening files in external applications
Re: Opening files in external applications
- Subject: Re: Opening files in external applications
- From: Kirk Kerekes <email@hidden>
- Date: Sun, 4 Aug 2002 12:28:56 -0500
Try NSWorkspace's
- (BOOL) openFile:(NSString *)fullPath
("Opens the file specified by fullPath using the default application for
its type; returns YES if the file was successfully opened, NO otherwise.
The sending application is deactivated before the request is sent.")
and/or
- (BOOL) openURL:(NSURL *)url
(which works just like openFile: except it expects an NSURL)
Message: 9
Date: Sun, 04 Aug 2002 11:25:59 -0400
Subject: Opening files in external applications
From: David Feldman <email@hidden>
To: Cocoa Dev <email@hidden>
I have a Cocoa app from which I want to open some Web pages in the user's
default browser, as well as a text file in the default app for that
(presumably TextEdit on most systems). So far the only way I can see to do
this is to use a system() call to the command-line open command and store
the URLs as weblocs. Is there a more elegant way?
Thanks,
--Dave
_______________________________________________
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.