Re: Opening a file in Preview
Re: Opening a file in Preview
- Subject: Re: Opening a file in Preview
- From: Vince DeMarco <email@hidden>
- Date: Fri, 23 Jan 2004 16:27:51 -0800
On Jan 23, 2004, at 3:38 PM, Moray Taylor wrote:
Hi,
I want to have a button on my app that loads a selected file into
'Preview', I know I could run a shell command, like
open -a /Applications/Preview.app /myfile
but this doesn't seem a very good way to do it, i.e. what if the user
has moved Preview.
Is there anything in Cocoa for this sort of thing.
Thanks in advance
Yeah look at NSWorkspace
- (BOOL)openFile:(NSString *)fullPath;
- (BOOL)openFile:(NSString *)fullPath withApplication:(NSString
*)appName;
- (BOOL)openFile:(NSString *)fullPath withApplication:(NSString
*)appName andDeactivate:(BOOL)flag;
vince
_______________________________________________
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.