• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: launching Application from terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >launching Application from terminal (From: Arun <email@hidden>)

  • Prev by Date: Re: Question about touchesBegan
  • Next by Date: Re: ImageAndTextCell still the way to go for icons in outline views?
  • Previous by thread: Re: launching Application from terminal
  • Next by thread: Re: launching Application from terminal
  • Index(es):
    • Date
    • Thread