On Aug 9, 2007, at 6:11 PM, Ingemar Ragnemalm wrote:
Chris Espinosa wrote:
Can someone tell me how to run another application from within a
Carbon
application like the Windows ShellExecute command?
I'm new to Carbon programming, and I can't find how to do this
Chris Hanson wrote:
Either use LaunchServices or NSWorkspace for applications, or
fork/ exec or NSTask for command-line tools.
Is there any particular reason not to use fork/exec for GUI
applications?
I use fork/exec for all my launching needs, and it seems to work
fine, with the
limitation that the launched application will halt if I quit the
launching one.
(I believe I can get around that by launching in two steps,
according to docs
I have read on the subject.) But I should mention that it fails
occasionally, I have
not yet tracked down why, either the pipe or the fork sometimes
fails. I suspect
that that is just yet another bug in my own code, although pretty
hard to debug.
I'd say one significant concern is that if the app is already open,
you will make a separate instance of it, which is not correct Mac OS
behavior.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden