Re: launchd agents
Re: launchd agents
- Subject: Re: launchd agents
- From: "Finlay Dobbie" <email@hidden>
- Date: Sun, 12 Nov 2006 09:41:42 +0000
As has been explained in the past on darwin-dev, LaunchAgents are
basically unusable in Tiger because of this. Your best solution will
be to use one of the other methods detailed in
<http://developer.apple.com/technotes/tn2005/tn2083.html>.
-- Finlay
On 11/11/06, Keith Duncan <email@hidden> wrote:
Hi,
I've written a launchd agent that displays a small GUI. My main
function is as follows:
int main (int argc, const char *argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSApplicationLoad();
registerCallback();
theAgent = [[Agent alloc] init];
[[NSRunLoop currentRunLoop] run];
//[[NSApplication sharedApplication] run];
[pool release];
return 0;
}
Now, this works i.e. the window that theAgent creates is displayed
when running under Xcode and launchd - but the window's button's
don't respond at all. Using the NSApplication method allows the
buttons work but, and here's the problem, it crashes when launched
under launchd after you logout and back in again! I mean to say that
the first time I login it works, after that it doesn't and requires a
restart for it to run under launchd again without crashing.
So what I'm looking for is an 'official' way to display a GUI in a
launchd agent as neither of my methods work. Any help would be much
appreciated.
- Keith.
_______________________________________________
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
_______________________________________________
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