• 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: Dynamically open file with application of end user choise......
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Dynamically open file with application of end user choise...... (From: "Sutapalli Satyanarayana" <email@hidden>)

  • Prev by Date: Re: Dynamically open file with application of end user choise......
  • Next by Date: Re: Choose applications dialog?
  • Previous by thread: Re: Dynamically open file with application of end user choise......
  • Next by thread: Choose applications dialog?
  • Index(es):
    • Date
    • Thread