• 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
launchd agents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

launchd agents


  • Subject: launchd agents
  • From: Keith Duncan <email@hidden>
  • Date: Sat, 11 Nov 2006 21:13:48 +0000

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


  • Follow-Ups:
    • Re: launchd agents
      • From: "Finlay Dobbie" <email@hidden>
  • Prev by Date: how to validate toolbar with different target?
  • Next by Date: Re: how to validate toolbar with different target?
  • Previous by thread: Re: how to validate toolbar with different target?
  • Next by thread: Re: launchd agents
  • Index(es):
    • Date
    • Thread