Re: Dynamically open file with application of end user choise......
Re: Dynamically open file with application of end user choise......
- Subject: Re: Dynamically open file with application of end user choise......
- From: Jean-Daniel Dupas <email@hidden>
- Date: Fri, 21 Aug 2009 22:25:22 +0200
Le 21 août 2009 à 09:08, Sutapalli Satyanarayana a écrit :
Hi,
I am using Cocoa with Obj C.
I am using the following method to open a file associated with a
particular application.
[[NSWorkspace sharedWorkspace] openFile:<some file path>]
But if the file is associated with certain application, it is opening.
If the file is not associated with any application, I want the user
to select the application also with which the file has to be opened.
In the following code we have to tell which application it has to
open.
[[NSWorkspace sharedWorkspace] openFile:< some file path>
withApplication:@"TextEdit"]
But I want user to select the application at run time dynamically.
--Satyam.
Use an NSOpenPanel to ask the user which application he want to use
and pass the application full path to -[openFile:withApplication:]
_______________________________________________
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