Re: Re: How do I get the NSApplication of other running
Re: Re: How do I get the NSApplication of other running
- Subject: Re: Re: How do I get the NSApplication of other running
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 7 Sep 2006 16:55:19 -0700
On 9/7/06, Ben Phipps <email@hidden> wrote:
On Sep 7, 2006, at 4:26 PM, Shawn Erickson wrote:
> On 9/7/06, Ben Phipps <email@hidden> wrote:
>> While we're on this topic, I have an app that launches a helper app.
>> It would be useful for me to know when the app stops running, either
>> by terminating on it's own, or more importantly by crashing. The
>> ugly and inefficient way I was doing this was to poll for a list of
>> running processes and look for my helper app. Does anyone have
>> suggestions for a more elegant solution?
>
> How do you launch your helper app? How do you communicate with it
> currently? Do you want to detect it is hung? etc.
It's contained within the first app's bundle, and is launched using
NSWorkspace. I communicate with it using a combination of
Distributed objects and distributed notifications. Detecting that
it's hung would be great. I can set up some sort of heartbeat to do
that, but the first app has a gui that has the status of the the
helper app so detecting a crash needs to be much more immediate than
a heartbeat.
If you are using DO then review the following...
<http://developer.apple.com/documentation/Cocoa/Conceptual/DistrObjects/Tasks/errors.html>
- Shawn
_______________________________________________
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