tags:

views:

64

answers:

3

I'm trying to split my application into different sub processes, each one doing a very specific thing. Main reason is stability and better memory utilization because i use a conservative garbage collector (boehm-weisser).

I don't want to do it one huge process that does it all.

Unfortunately the subprocesses must display some windows so they will need NSApplication instances.

But i want them to appear as one application in Expose and leave the menubar of the main process when they became active.

Is there any way to do this?

+2  A: 

I believe there's no way to do this (without a lot of hacking).

The only possibility which comes to my mind would be to have a dedicated UI process (which is the main Application) and do a lot of IPC to with the child processes. In short: splitting MVC over processes.

Nikolai Ruhe
+1  A: 

There is no way to do this. On Mac OS X, an application that has the key focus is also the main application and, thus, owns the main menu bar, is drawn as in focus, etc... The entire system is built around this notion, including Expose, the Dock, the App Picker, Launch Services, etc...

I'm also curious as to why you aren't using the collector built into the system. The entire system has been engineered to work well with this collector. It is a conservative, exactly scanning (except the stack), almost entirely non-blocking collector.

bbum
Because i need to be OS independent - except for the GUI.
Lothar
Well it would be extremely easy for apple to build this in. You just have to give each app a common appid and group all of them together. Time to suggest this to apple engineers. Because there current implementation makes no technical sense.
Lothar
A: 

Isn't this what Chrome and Stainless are doing?

Having one GUI application which talks to several worker processes is pretty easy to do. Things will get tricky if you want those helper processes to present UI.

I could imagine having helper applications with no menu bar or Dock icon. There just might be an option to have those tack overlay windows onto the main application's window. I have never tried anything remotely like this though.

Pierre Bernard