Re: launching Application from terminal
Re: launching Application from terminal
- Subject: Re: launching Application from terminal
- From: Jens Alfke <email@hidden>
- Date: Wed, 16 Dec 2009 13:21:03 -0800
On Dec 16, 2009, at 10:06 AM, Arun wrote:
If i launch Applications from Terminal, using the command
/Applications/Calculator.app/Contents/MacOS/Calculator
The application is getting launched. But the Application widow will
not be
the key window. Is there any way in which i can launch the
application using
the same command and still make the Application window as key window?
That's because Terminal hasn't relinquished its frontmost status, and
a newly launched app won't come to the front unless it's been
relinquished.
You could call [NSApp activateIgnoringOtherApps: YES] in your app when
it launches, but that's kind of rude.
But I agree with the others that passing command-line parameters to a
GUI app is a pretty odd thing to do; you should rethink it unless you
have some really strong reason to do it (like, this app is a developer
tool that will mostly be invoked from the command line.)
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden