Re: Forcing an application into the foreground
Re: Forcing an application into the foreground
- Subject: Re: Forcing an application into the foreground
- From: John Stiles <email@hidden>
- Date: Wed, 2 Mar 2005 14:32:53 -0800
On Mar 2, 2005, at 2:29 PM, Finlay Dobbie wrote:
On Wed, 2 Mar 2005 14:08:58 -0800, John Stiles <email@hidden>
wrote:
Another poster suggested using "open /whatever/YourApp.app", and this
will probably work too because open calls Launch Services internally.
However, using NSWorkspace is only one or two lines of code, and
probably has fewer goofy side effects. (i.e. someone could construct
an
app name that will generate problems for your synthesized command
line.)
Actually, open uses NSWorkspace ;-)
Also, using NSWorkspace or Launch Services from a daemon can certainly
have oodles of goofy side effects, since doesn't it connect you to the
window server?
Oh jeez, this is for a daemon?
I guess your best bet is to fork off to a BSD process which opens the
app itself. So relying on "open" really is the right choice. Just be
real careful about escaping that filename! Quotes, spaces, slashes,
hyphens, Japanese characters, etc. can all appear in filenames.
_______________________________________________
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