Re: how do I make sure a certain app opens a file without using openFile: withApplication:?
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