Re: Cocoa daemon
Re: Cocoa daemon
- Subject: Re: Cocoa daemon
- From: Wade Tregaskis <email@hidden>
- Date: Thu, 13 Nov 2003 17:28:35 +1100
1) Is it possible for an app to change state in this regard?
E.g. could a regular Cocoa app with icon in the dock be switched
into daemon mode, so that its main process keeps running but its
UI and dock icon go away?
There's been a thread on this somewhere else recently (possibly this
list; check the archives) where it was found that if you jump through
enough hoops, you can get this behaviour to be dynamic. But whether
you're willing to jump through those hoops or not...
It's probably better to create two apps for this, with a well defined
interface between them. It's simpler for you to implement - you won't
have to hack about the system trying to defeat it's expectations - and
probably a better design, all in all.
2) If the app is created as a daemon but contains AppKit,
can it still (say, responding to an AppleEvent) come to the
foreground, put up a menu bar & UI, etc?
You can display a UI, but no menu bar. There's a few Finder extensions
and other such utilities which do so. I think you can even attach
auto-hiding (palette) windows to particular apps, so they disappear
appropriately when that app goes to the background. I've no idea how
to do this though - I've just seen it, 'tis all.
Personally though, I would think it quite disturbing if an app just
magically appeared in the dock and popped up it's menu bar. I hope you
have a good use for this. :)
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.