• 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: how do I make sure a certain app opens a file without using openFile: withApplication:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I make sure a certain app opens a file without using openFile: withApplication:?


  • Subject: Re: how do I make sure a certain app opens a file without using openFile: withApplication:?
  • From: Greg Herlihy <email@hidden>
  • Date: Fri, 30 Jun 2006 09:20:30 -0700
  • Thread-topic: how do I make sure a certain app opens a file without using openFile: withApplication:?

You may have to use Launch Services. Launch Services' LSOpenApplication
routine can be used to launch an application at a specific location. By
providing an open documents Apple Event, a program can instruct the app
being launched to open one or more particular files once it is up and
running.

Alternately, the program can call fork() and exec(), supplying the path to
the executable and the documents to open as command line arguments. But this
approach is somewhat low-level and not to everyone's taste.

Greg




On 6/30/06 7:37 AM, "Alan Smith" <email@hidden> wrote:

> Sherm: Yes, that's the way I'm doing it now.
>
> Glenn: That seems to have the same affect as NSWorkspace's openFile:
> withApplication:.
>
> :(
>
> Thanks guys but I'm afraid the problem is still unsolved.
> Alan
>
> On 6/29/06, Sherm Pendley <email@hidden> wrote:
>> On Jun 29, 2006, at 3:05 PM, Alan Smith wrote:
>>
>>> Hi everyone,
>>> I need to open a pilot for the EV series without using openFile:
>>> withApplication:. If I use that it doesn't work properly, if I use
>>> openFile: it works great. The only problem is that I need to make sure
>>> that the specified copy of the EV opens the pilot. I have my app copy
>>> the EV game and manage the pilots and plugins for it. So I want my
>>> app's copy of the EV to open, not the another copy of the EV that
>>> could be on disk somewhere.
>>>
>>> How do I open a file with an app without using openFile:
>>> withApplication:?
>>
>> Have you tried passing the full path to your app bundle as the second
>> parameter?
>>
>> sherm--
>>
>> Cocoa programming in Perl: http://camelbones.sourceforge.net
>> Hire me! My resume: http://www.dot-app.org
>>
>>
>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: how do I make sure a certain app opens a file without using openFile: withApplication:? (From: "Alan Smith" <email@hidden>)

  • Prev by Date: Re: Single selection and bindings
  • Next by Date: Re: Clearing the key event
  • Previous by thread: Re: how do I make sure a certain app opens a file without using openFile: withApplication:?
  • Next by thread: open gl - 10.4.7 incompatibility in MacBook
  • Index(es):
    • Date
    • Thread